NotificationAction class

Represents an action that can be performed on a notification.

Constructors

NotificationAction({required String id, required String title, String? titleColor, String? icon, List<NotificationActionInput> inputs = const <NotificationActionInput>[], bool contextual = false, bool authenticationRequired = false, bool destructive = false, bool showsUserInterface = false, bool allowInBackground = true, String? payload})
Creates a notification action.
const
NotificationAction.fromMap(Map<String, dynamic> map)
Creates a notification action from a map.
factory

Properties

allowInBackground → bool
Whether the action can be performed in the background.
final
authenticationRequired → bool
Whether authentication is required to perform the action.
final
contextual → bool
Whether the action is contextual.
final
destructive → bool
Whether the action is destructive.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → String?
The icon of the action.
final
id → String
The unique identifier for the action.
final
inputs → List<NotificationActionInput>
The input fields for the action.
final
payload → String?
Optional payload data for the action.
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showsUserInterface → bool
Whether the action shows a user interface.
final
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
title → String
The title of the action.
final
titleColor → String?
The color of the action title.
final

Methods

copyWith({String? id, String? title, String? titleColor, String? icon, List<NotificationActionInput>? inputs, bool? contextual, bool? authenticationRequired, bool? destructive, bool? showsUserInterface, bool? allowInBackground, String? payload}) → NotificationAction
Creates a copy of this action with the given fields replaced.
fromJson(String json) → NotificationAction
Converts the object from a JSON string representation.
inherited
fromMap(Map<String, dynamic> map) → NotificationAction
Converts the object from a Map representation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → String
Converts the object to a JSON string representation.
inherited
toMap() → Map<String, dynamic>
Converts the BaseDataModel object to a Map representation.
toString() → String
A string representation of this object.
inherited

Operators

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