NotificationAction class
One button below the notification text (Android shows at most 3).
Constructors
- NotificationAction({required String id, required String label, NotificationActionType type = NotificationActionType.event, String? uri, String? iconName})
-
Creates a NotificationAction.
const
- NotificationAction.deepLink({required String label, required String uri, String id = 'link'})
-
A button that opens
uri(deep link or web page).const - NotificationAction.event({required String id, required String label})
-
A button that only reports
idon the status stream.const - NotificationAction.fromMap(Map m)
-
Builds a NotificationAction from a map; missing keys keep their defaults.
factory
- NotificationAction.openApp({required String label, String id = 'open'})
-
A button that opens the app.
const
- NotificationAction.stop({String label = 'Stop', String id = 'stop'})
-
A button that stops tracking.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- iconName → String?
-
Optional drawable/mipmap resource name for the button icon (rarely
shown by modern Android versions).
final
- id → String
-
Identifier reported on the status stream / launch intent.
final
- label → String
-
Button label.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → NotificationActionType
-
What the button does.
final
- uri → String?
-
Target of NotificationActionType.deepLink.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Serializes this NotificationAction to a JSON-friendly map (the format sent to the native side and stored).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override