NotificationModel class
A model class representing a single notification instance.
The NotificationModel class encapsulates the information the core needs to
display a single notification: its content and action buttons. Optional
add-on data (scheduling, localizations, …) is attached at creation time via
createNotification(extensions: [...]) and rides in the serialized map as
sibling keys the core does not interpret — so the core stays feature-agnostic.
Constructors
-
NotificationModel({NotificationContent? content, List<
NotificationActionButton> ? actionButtons}) - Creates a new instance of the NotificationModel class with the given content and action buttons.
Properties
-
actionButtons
→ List<
NotificationActionButton> ? -
The action buttons for the notification.
no setter
- content → NotificationContent?
-
The content of the notification.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
fromMap(
Map< String, dynamic> mapData) → NotificationModel? -
Imports data from a serializable object
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
Exports all content into a serializable object
override
-
toString(
) → String -
A string representation of this object.
inherited
-
validate(
) → void -
Validates if the models has all the requirements to be considered valid
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited