showNotification function

Future<void> showNotification(
  1. RemoteNotification notification
)

Implementation

Future<void> showNotification(RemoteNotification notification) {
  return flutterLocalNotificationsPlugin.show(
    notification.hashCode,
    notification.title,
    notification.body,
    NotificationDetails(
      android: AndroidNotificationDetails(
        androidNotificationChannel.id,
        androidNotificationChannel.name,
        icon: notification.android?.smallIcon,
      ),
      iOS: const DarwinNotificationDetails(
        presentAlert: true,
        presentBadge: true,
        presentSound: true,
      ),
    ),
  );
}