AndroidNotificationOptions class
Notification options for Android platform.
Constructors
-
AndroidNotificationOptions({int? id, required String channelId, required String channelName, String? channelDescription, NotificationChannelImportance channelImportance = NotificationChannelImportance.DEFAULT, NotificationPriority priority = NotificationPriority.DEFAULT, bool enableVibration = false, bool playSound = false, bool showWhen = false, bool isSticky = true, NotificationVisibility visibility = NotificationVisibility.VISIBILITY_PUBLIC, NotificationIconData? iconData, List<
NotificationButton> ? buttons}) - Constructs an instance of AndroidNotificationOptions.
Properties
-
A list of buttons to display in the notification.
A maximum of 3 is allowed.
final
- channelDescription → String?
-
The description of the notification channel.
This value is displayed to the user in the notification settings.
final
- channelId → String
-
Unique ID of the notification channel.
final
- channelImportance → NotificationChannelImportance
-
The importance of the notification channel.
See https://developer.android.com/training/notify-user/channels?hl=ko#importance
The default is
NotificationChannelImportance.DEFAULT
.final - channelName → String
-
The name of the notification channel.
This value is displayed to the user in the notification settings.
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
- iconData → NotificationIconData?
-
The data of the icon to display in the notification.
If the value is null, the app launcher icon is used.
final
- id → int?
-
Unique ID of the notification.
final
- isSticky → bool
-
Whether the system will restart the service if the service is killed.
The default is
true
.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.DEFAULT
.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- 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
-
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