showBigTextNotification method

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

Implementation

Future<void> showBigTextNotification({String? title, required String body, String? payload, required FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin}) async {
  BigTextStyleInformation bigTextStyleInformation = BigTextStyleInformation(
    body, htmlFormatBigText: true,
    contentTitle: title, htmlFormatContentTitle: true,
  );
  AndroidNotificationDetails androidPlatformChannelSpecifics = AndroidNotificationDetails(
    'CCG_delivery channel id', 'CCG_delivery name', importance: Importance.max,
    styleInformation: bigTextStyleInformation, priority: Priority.max, playSound: true,
    sound: const RawResourceAndroidNotificationSound('notification'),
  );
  //var darwinNotificationDetails = const DarwinNotificationDetails();
  NotificationDetails platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics);
  await flutterLocalNotificationsPlugin.show(0, title, body, platformChannelSpecifics, payload: payload);
}