getLastRemotePushNotification method
Implementation
@override
Future<RemoteNotificationData?> getLastRemotePushNotification() async {
try {
var notification = await methodChannel.invokeMethod('getLastRemotePushNotification');
if (notification == null || notification['id'] == null || notification['title'] == null) { return null; }
return RemoteNotificationData(notification['id'] as String, notification['title'] as String);
}
on PlatformException catch(exception) {
log.severe('Exception when displaying last received notification: ${exception.message}');
return null;
}
}