showImageNotification method
Future<int>
showImageNotification({
- required String title,
- required String message,
- required String imageUrl,
- String? channelId,
- int? priority,
- bool? autoCancel,
- String? targetScreen,
- Map<
String, dynamic> ? extraData,
override
Show a notification with an image.
Returns the notification ID.
Implementation
@override
Future<int> showImageNotification({
required String title,
required String message,
required String imageUrl,
String? channelId,
int? priority,
bool? autoCancel,
String? targetScreen,
Map<String, dynamic>? extraData,
}) async {
final result = await methodChannel
.invokeMethod<int>('showImageNotification', {
'title': title,
'message': message,
'imageUrl': imageUrl,
if (channelId != null) 'channelId': channelId,
if (priority != null) 'priority': priority,
if (autoCancel != null) 'autoCancel': autoCancel,
if (targetScreen != null) 'targetScreen': targetScreen,
if (extraData != null) 'extraData': extraData,
});
return result ?? -1;
}