getNotificationAppLaunchDetails method Null safety

  1. @override
Future<NotificationAppLaunchDetails?> getNotificationAppLaunchDetails()
inherited

Returns info on if a notification had been used to launch the application.

Implementation

@override
Future<NotificationAppLaunchDetails?>
    getNotificationAppLaunchDetails() async {
  final Map<dynamic, dynamic>? result =
      await _channel.invokeMethod('getNotificationAppLaunchDetails');
  return result != null
      ? NotificationAppLaunchDetails(result['notificationLaunchedApp'],
          result.containsKey('payload') ? result['payload'] : null)
      : null;
}