onPushNotification method

  1. @override
  2. @android
Future<void> onPushNotification(
  1. Map<String, String> data
)
override

Call this when your Firebase handler receives a push notification. Non-cobrowse push notifications will be ignored.

Implementation

@override
@TargetPlatform.android
Future<void> onPushNotification(Map<String, String> data) async {
  try {
    await methodChannel.invokeMethod('onPushNotification', data);
  } on PlatformException catch (e) {
    print('Cannot process the notification: $e');
  }
}