AndroidNotificationOptions constructor

AndroidNotificationOptions({
  1. @Deprecated('Use startService(serviceId) instead.') int? id,
  2. required String channelId,
  3. required String channelName,
  4. String? channelDescription,
  5. NotificationChannelImportance channelImportance = NotificationChannelImportance.LOW,
  6. NotificationPriority priority = NotificationPriority.LOW,
  7. bool enableVibration = false,
  8. bool playSound = false,
  9. bool showWhen = false,
  10. bool showBadge = false,
  11. bool onlyAlertOnce = false,
  12. NotificationVisibility visibility = NotificationVisibility.VISIBILITY_PUBLIC,
})

Constructs an instance of AndroidNotificationOptions.

Implementation

AndroidNotificationOptions({
  @Deprecated('Use startService(serviceId) instead.') this.id,
  required this.channelId,
  required this.channelName,
  this.channelDescription,
  this.channelImportance = NotificationChannelImportance.LOW,
  this.priority = NotificationPriority.LOW,
  this.enableVibration = false,
  this.playSound = false,
  this.showWhen = false,
  this.showBadge = false,
  this.onlyAlertOnce = false,
  this.visibility = NotificationVisibility.VISIBILITY_PUBLIC,
})  : assert(channelId.isNotEmpty),
      assert(channelName.isNotEmpty);