NotificationMessage.fromPluginTemplate constructor

NotificationMessage.fromPluginTemplate(
  1. String id,
  2. String title,
  3. String body, {
  4. String? image,
  5. String? largeImage,
  6. String? heroImage,
  7. List<NotificationText> extraTexts = const [],
  8. String? attribution,
  9. String? launch,
  10. String? group,
  11. Map<String, dynamic> payload = const {},
  12. List<NotificationAction> actions = const [],
  13. List<NotificationInput> inputs = const [],
  14. NotificationAudio? audio,
  15. NotificationProgress? progress,
  16. NotificationScenario? scenario,
  17. NotificationDuration? duration,
  18. NotificationActivationType? activationType,
  19. 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');
}