AndroidNotificationOptions class

Notification options for Android platform.

Constructors

AndroidNotificationOptions({@Deprecated('Use startService(serviceId) instead.') int? id, required String channelId, required String channelName, String? channelDescription, NotificationChannelImportance channelImportance = NotificationChannelImportance.LOW, NotificationPriority priority = NotificationPriority.LOW, bool enableVibration = false, bool playSound = false, bool showWhen = false, bool showBadge = false, bool onlyAlertOnce = false, NotificationVisibility visibility = NotificationVisibility.VISIBILITY_PUBLIC})
Constructs an instance of AndroidNotificationOptions.

Properties

channelDescription String?
The description of the notification channel.
final
channelId String
Unique ID of the notification channel.
final
channelImportance NotificationChannelImportance
The importance of the notification channel. The default is NotificationChannelImportance.LOW.
final
channelName String
The name of the notification channel.
final
enableVibration bool
Whether to enable vibration when creating notifications. The default is false.
final
hashCode int
The hash code for this object.
no setterinherited
id int?
Unique ID of the notification.
final
onlyAlertOnce bool
Whether to only alert once when the notification is created. The default is false.
final
playSound bool
Whether to play sound when creating notifications. The default is false.
final
priority NotificationPriority
Priority of notifications for Android 7.1 and lower. The default is NotificationPriority.LOW.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showBadge bool
Whether to show the badge near the app icon when service is started. The default is false.
final
showWhen bool
Whether to show the timestamp when the notification was created in the content view. The default is false.
final
visibility NotificationVisibility
Control the level of detail displayed in notifications on the lock screen. The default is NotificationVisibility.VISIBILITY_PUBLIC.
final

Methods

copyWith({String? channelId, String? channelName, String? channelDescription, NotificationChannelImportance? channelImportance, NotificationPriority? priority, bool? enableVibration, bool? playSound, bool? showWhen, bool? showBadge, bool? onlyAlertOnce, NotificationVisibility? visibility}) AndroidNotificationOptions
Creates a copy of the object replaced with new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Returns the data fields of AndroidNotificationOptions in JSON format.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited