NotificationActionButton class

Represents a button to be displayed inside a notification. Note: Since Android 7, icons are only displayed for Media Layout Notifications. The icon must be a native resource media type.

Constructors

NotificationActionButton({required String key, required String label, String? icon, bool enabled = true, bool requireInputText = false, bool autoDismissible = true, bool showInCompactView = false, bool isDangerousOption = false, bool isAuthenticationRequired = false, Color? color, ActionType actionType = ActionType.Default})
Constructs a NotificationActionButton.

Properties

actionType ActionType?
Returns the type of action associated with the action button.
no setter
autoDismissible bool?
Determines if the notification should be dismissed automatically when the action button is pressed.
no setter
color Color?
Returns the color of the action button.
no setter
enabled bool?
Indicates whether the action button is enabled.
no setter
hashCode int
The hash code for this object.
no setterinherited
icon String?
Returns the icon resource of the action button.
no setter
isAuthenticationRequired bool
Returns if authentication is required to open the notification.
no setter
isDangerousOption bool?
Indicates if the action button represents a dangerous option or choice.
no setter
key String?
Returns the unique key identifier of the action button.
no setter
label String?
Returns the label text of the action button.
no setter
requireInputText bool
Indicates whether the action button requires input text.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showInCompactView bool?
Indicates if the action button should be shown in the compact view of the notification.
no setter

Methods

adaptInputFieldToRequireText() → void
Adapts the input field type to require text based on the action type.
fromMap(Map<String, dynamic> mapData) NotificationActionButton?
Creates a NotificationActionButton instance from a map of data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processRetroCompatibility(Map<String, dynamic> dataMap) → void
Processes retro compatibility for older versions of the action button.
toMap() Map<String, dynamic>
Converts the NotificationActionButton instance to a map.
toString() String
A string representation of this object.
inherited
validate() → void
Validates the properties of the action button.

Operators

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