configure static method
Future<void>
configure({
- required dynamic onNotificationArrival(),
- required dynamic onNotificationTap(),
- required MPAndroidNotificationsSettings androidNotificationsSettings,
Configures the MPush plugin with the callbacks.
@param onNotificationArrival Called when a push notification arrives. @param onNotificationTap Called when a push notification is tapped. @param androidNotificationsSettings Settings for the android notification.
Implementation
static Future<void> configure({
required Function(Map<String, dynamic>) onNotificationArrival,
required Function(Map<String, dynamic>) onNotificationTap,
required MPAndroidNotificationsSettings androidNotificationsSettings,
}) async {
_initializeMethodCall();
_onNotificationArrival = onNotificationArrival;
_onNotificationTap = onNotificationTap;
await _channel.invokeMethod(
'configure',
androidNotificationsSettings.toMethodChannelArguments(),
);
}