showTextNotification static method

Future<void> showTextNotification(
  1. String title,
  2. String body,
  3. NotificationBody? notificationBody,
  4. FlutterLocalNotificationsPlugin fln,
)

Implementation

static Future<void> showTextNotification(
    String title,
    String body,
    NotificationBody? notificationBody,
    FlutterLocalNotificationsPlugin fln) async {
  if (notificationBody != null) {}
  const AndroidNotificationDetails androidPlatformChannelSpecifics =
      AndroidNotificationDetails(
    'growlytics', 'growlytics', playSound: false,
    importance: Importance.max, priority: Priority.max,

    actions: [],

    //sound: RawResourceAndroidNotificationSound('notification'),
  );
  const NotificationDetails platformChannelSpecifics = NotificationDetails(
    android: androidPlatformChannelSpecifics,
  );
  await fln.show(0, title, body, platformChannelSpecifics,
      payload: notificationBody != null
          ? jsonEncode(notificationBody.toJson())
          : null);
}