AndroidNotificationOptions constructor

AndroidNotificationOptions({
  1. int? foregroundServiceType,
  2. int? id,
  3. required String channelId,
  4. required String channelName,
  5. String? channelDescription,
  6. NotificationChannelImportance channelImportance = NotificationChannelImportance.DEFAULT,
  7. NotificationPriority priority = NotificationPriority.DEFAULT,
  8. bool enableVibration = false,
  9. bool playSound = false,
  10. bool showWhen = false,
  11. bool isSticky = true,
  12. NotificationVisibility visibility = NotificationVisibility.VISIBILITY_PUBLIC,
  13. NotificationIconData? iconData,
  14. List<NotificationButton>? buttons,
})

Constructs an instance of AndroidNotificationOptions.

Implementation

AndroidNotificationOptions({
  this.foregroundServiceType,
  this.id,
  required this.channelId,
  required this.channelName,
  this.channelDescription,
  this.channelImportance = NotificationChannelImportance.DEFAULT,
  this.priority = NotificationPriority.DEFAULT,
  this.enableVibration = false,
  this.playSound = false,
  this.showWhen = false,
  this.isSticky = true,
  this.visibility = NotificationVisibility.VISIBILITY_PUBLIC,
  this.iconData,
  this.buttons,
})  : assert(channelId.isNotEmpty),
      assert(channelName.isNotEmpty),
      assert((buttons?.length ?? 0) < 4);