NotificationMessage.fromCustomTemplate constructor

NotificationMessage.fromCustomTemplate(
  1. String id, {
  2. String? group,
  3. String? launch,
  4. Map<String, dynamic> payload = const {},
})

Implementation

NotificationMessage.fromCustomTemplate(
  this.id, {
  this.group,
  this.launch,
  this.payload = const {},
})  : templateType = TemplateType.custom,
      title = null,
      body = null,
      image = null,
      largeImage = null,
      heroImage = null,
      extraTexts = const [],
      attribution = null,
      actions = const [],
      inputs = const [],
      audio = null,
      progress = null,
      scenario = null,
      duration = null,
      activationType = null,
      displayTimestamp = null {
  assert(id.trim().isNotEmpty, 'id must not be empty');
  assert(group == null || group!.trim().isNotEmpty,
      'group must not be empty when provided');
}