getInitialMessage method

  1. @override
Future<Map<String, dynamic>?> getInitialMessage()
override

Get the initial message that caused the app to open.

Usable only for Android and will have a value only if the app was terminated and the user clicked on a notification.

Implementation

@override
Future<Map<String, dynamic>?> getInitialMessage() async {
  if (defaultTargetPlatform != TargetPlatform.android) {
    return Future.value(null);
  }

  final result =
      await methodChannel.invokeMethod('AzNotificationHub.getInitialMessage');
  return result == null ? result : Map<String, dynamic>.from(result);
}