showNotification static method
void
showNotification(
- RemoteMessage message
Implementation
static void showNotification(RemoteMessage message) {
final NotificationDetails notiDetails = NotificationDetails(
android: AndroidNotificationDetails('com.medibhai', 'Medibhai',
importance: Importance.max,
priority: Priority.high,
enableLights: true,
enableVibration: true,
onlyAlertOnce: true),
iOS: DarwinNotificationDetails(
presentAlert: true,
presentBadge: true,
categoryIdentifier: 'com.medibhai',
presentSound: true),
);
_notiPlugin.show(
DateTime.now().microsecond,
message.notification!.title,
message.notification!.body,
notiDetails,
payload: message.data.toString(),
);
}