showBigPictureNotificationHiddenLargeIcon2 static method

Future<void> showBigPictureNotificationHiddenLargeIcon2(
  1. String title,
  2. String body,
  3. String orderID,
  4. String image,
  5. FlutterLocalNotificationsPlugin fln,
)

Implementation

static Future<void> showBigPictureNotificationHiddenLargeIcon2(String title, String body, String orderID, String image, FlutterLocalNotificationsPlugin fln) async {
  final String largeIconPath = await _downloadAndSaveFile(image, 'largeIcon');
  final String bigPicturePath = await _downloadAndSaveFile(image, 'bigPicture');
  final BigPictureStyleInformation bigPictureStyleInformation = BigPictureStyleInformation(
    FilePathAndroidBitmap(bigPicturePath), hideExpandedLargeIcon: true,
    contentTitle: title, htmlFormatContentTitle: true,
    summaryText: body, htmlFormatSummaryText: true,
  );
  final AndroidNotificationDetails androidPlatformChannelSpecifics = AndroidNotificationDetails(
    'CCG_delivery', 'CCG_delivery name',
    largeIcon: FilePathAndroidBitmap(largeIconPath), priority: Priority.max, playSound: true,
    styleInformation: bigPictureStyleInformation, importance: Importance.max,
    sound: const RawResourceAndroidNotificationSound('notification'),
  );
  final NotificationDetails platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics);
  await fln.show(0, title, body, platformChannelSpecifics, payload: orderID);
}