setOnNotificationReceivedListener static method

void setOnNotificationReceivedListener(
  1. dynamic listener(
    1. GetSocialNotification
    )
)

Set listener to be invoked when a Push Notification was received.

listener Function to be invoked.

Implementation

static void setOnNotificationReceivedListener(
    Function(GetSocialNotification) listener) {
  NativeBridge.registerListener(
      'Notifications.setOnNotificationReceivedListener', (result) {
    listener(GetSocialNotification.fromJSON(jsonDecode(result)));
  });
}