showTextNotification method

  1. @override
Future<void> showTextNotification({
  1. required MessageNotificationModel mNotif,
})
override

Implementation

@override
Future<void> showTextNotification({ required MessageNotificationModel mNotif }) async {
  AndroidNotificationDetails androidPlatformChannelSpecifics = AndroidNotificationDetails(
    mNotif.channel.id,
    mNotif.channel.name,
    channelDescription: mNotif.channel.description,
    importance: Importance.max,
    priority: Priority.max,
    playSound: true,
    sound: const RawResourceAndroidNotificationSound('notification'),
  );
  NotificationDetails platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics);
  await flutterLocalNotificationsPlugin.show(mNotif.id, mNotif.title, mNotif.body, platformChannelSpecifics, payload: mNotif.payload.jsonEncodeString);
}