showTextNotification method

Future<void> showTextNotification({
  1. String? title,
  2. String? body,
  3. String? payload,
  4. required FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin,
})

Implementation

Future<void> showTextNotification({ String? title, String? body, String? payload, required FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin}) async {
  const AndroidNotificationDetails androidPlatformChannelSpecifics = AndroidNotificationDetails(
    'CCG_delivery', 'CCG_delivery name', playSound: true,
    importance: Importance.max, priority: Priority.max, sound: RawResourceAndroidNotificationSound('notification'),
  );
  const NotificationDetails platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics);
  await flutterLocalNotificationsPlugin.show(0, title, body, platformChannelSpecifics, payload: payload);
}