showBigPictureNotificationHiddenLargeIcon method
Future<void>
showBigPictureNotificationHiddenLargeIcon({
- required MessageNotificationModel mNotif,
override
Implementation
@override
Future<void> showBigPictureNotificationHiddenLargeIcon({ required MessageNotificationModel mNotif }) async {
final String largeIconPath = await downloadAndSaveFile(url: mNotif.imagePath, fileName: 'largeIcon');
final String bigPicturePath = await downloadAndSaveFile(url: mNotif.imagePath, fileName: 'bigPicture');
final BigPictureStyleInformation bigPictureStyleInformation = BigPictureStyleInformation(
FilePathAndroidBitmap(bigPicturePath), hideExpandedLargeIcon: true,
contentTitle: mNotif.title, htmlFormatContentTitle: true,
summaryText: mNotif.body, htmlFormatSummaryText: true,
);
final AndroidNotificationDetails androidPlatformChannelSpecifics = AndroidNotificationDetails(
mNotif.channel.id,
mNotif.channel.name,
channelDescription: mNotif.channel.description,
largeIcon: FilePathAndroidBitmap(largeIconPath),
priority: Priority.max, playSound: true,
importance: Importance.max,
styleInformation: bigPictureStyleInformation,
sound: const RawResourceAndroidNotificationSound('notification'),
);
final NotificationDetails platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.show(mNotif.id, mNotif.title, mNotif.body, platformChannelSpecifics, payload: mNotif.payload.jsonEncodeString);
}