NotificationMessage.fromPluginTemplate constructor
NotificationMessage.fromPluginTemplate(
- String id,
- String title,
- String body, {
- String? image,
- String? largeImage,
- String? heroImage,
- List<
NotificationText> extraTexts = const [], - String? attribution,
- String? launch,
- String? group,
- Map<
String, dynamic> payload = const {}, - List<
NotificationAction> actions = const [], - List<
NotificationInput> inputs = const [], - NotificationAudio? audio,
- NotificationProgress? progress,
- NotificationScenario? scenario,
- NotificationDuration? duration,
- NotificationActivationType? activationType,
- DateTime? displayTimestamp,
Implementation
NotificationMessage.fromPluginTemplate(
this.id,
String this.title,
String this.body, {
this.image,
this.largeImage,
this.heroImage,
this.extraTexts = const [],
this.attribution,
this.launch,
this.group,
this.payload = const {},
this.actions = const [],
this.inputs = const [],
this.audio,
this.progress,
this.scenario,
this.duration,
this.activationType,
this.displayTimestamp,
}) : templateType = TemplateType.plugin {
assert(id.trim().isNotEmpty, 'id must not be empty');
assert(group == null || group!.trim().isNotEmpty,
'group must not be empty when provided');
}