NotificationPayload constructor
const
NotificationPayload({
- required String id,
- required String title,
- required String body,
- Map<
String, dynamic> data = const <String, dynamic>{}, - String? imageUrl,
- String? icon,
- String? sound,
- String? badge,
- String? tag,
- String? channelId,
- String? channelName,
- String? channelDescription,
- NotificationImportance importance = NotificationImportance.defaultImportance,
- NotificationPriority priority = NotificationPriority.defaultPriority,
- DateTime? timestamp,
- String? largeIcon,
- String? bigPicture,
- List<
NotificationAction> actions = const <NotificationAction>[], - String? color,
- List<
int> ? vibrationPattern, - String? category,
- String? threadIdentifier,
- String? collapseKey,
- int? ttl,
- Duration? deliveryDelay,
- bool isScheduled = false,
- DateTime? scheduledDateTime,
- RepeatInterval? repeatInterval,
- String? payload,
- bool showTimestamp = true,
- bool ongoing = false,
- bool autoCancel = true,
- bool silent = false,
- NotificationPayload? publicVersion,
- String? ticker,
- int? whenTimestamp,
- bool usesChronometer = false,
- bool chronometerCountDown = false,
- bool enableLights = true,
- bool enableVibration = true,
- bool playSound = true,
- bool criticalAlert = false,
- InterruptionLevel interruptionLevel = InterruptionLevel.active,
The constructor of the notification payload.
Implementation
const NotificationPayload({
required this.id,
required this.title,
required this.body,
this.data = const <String, dynamic>{},
this.imageUrl,
this.icon,
this.sound,
this.badge,
this.tag,
this.channelId,
this.channelName,
this.channelDescription,
this.importance = NotificationImportance.defaultImportance,
this.priority = NotificationPriority.defaultPriority,
this.timestamp,
this.largeIcon,
this.bigPicture,
this.actions = const <NotificationAction>[],
this.color,
this.vibrationPattern,
this.category,
this.threadIdentifier,
this.collapseKey,
this.ttl,
this.deliveryDelay,
this.isScheduled = false,
this.scheduledDateTime,
this.repeatInterval,
this.payload,
this.showTimestamp = true,
this.ongoing = false,
this.autoCancel = true,
this.silent = false,
this.publicVersion,
this.ticker,
this.whenTimestamp,
this.usesChronometer = false,
this.chronometerCountDown = false,
this.enableLights = true,
this.enableVibration = true,
this.playSound = true,
this.criticalAlert = false,
this.interruptionLevel = InterruptionLevel.active,
});