setOnNotificationClickedListener static method

void setOnNotificationClickedListener(
  1. dynamic listener(
    1. GetSocialNotification,
    2. NotificationContext
    )
)

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

listener Function to be invoked.

Implementation

static void setOnNotificationClickedListener(
    Function(GetSocialNotification, NotificationContext) listener) {
  NativeBridge.registerListener(
      'Notifications.setOnNotificationClickedListener', (result) {
    var json = jsonDecode(result);
    listener(GetSocialNotification.fromJSON(json['notification']),
        NotificationContext.fromJSON(json['context']));
  });
}