NotificationAction class

Represents an action button that can be displayed with a notification.

Actions allow users to interact with notifications without opening the app. Common examples include "Reply", "Archive", "Delete", etc.

Annotations
  • @JsonSerializable.new()

Constructors

NotificationAction({required String id, required String label, String? icon, bool requiresAuth = false, bool launchesApp = true})
const
NotificationAction.fromJson(Map<String, dynamic> json)
Creates a NotificationAction from JSON data.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
icon String?
Optional icon identifier for the action button.
final
id String
Unique identifier for this action.
final
label String
User-facing label for the action button.
final
launchesApp bool
Whether tapping this action should launch the app in foreground.
final
requiresAuth bool
Whether this action requires the app to be unlocked/authenticated.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this NotificationAction to JSON data.
toString() String
A string representation of this object.
override

Operators

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