NotificationEvent class
NotificationEvent is the object converted from notification Notification anatomy: https://developer.android.com/guide/topics/ui/notifiers/notifications
Constructors
- NotificationEvent({String? uniqueId, String? key, int? id, int? uid, String? channelId, DateTime? createAt, String? packageName, String? title, String? text, String? message, int? timestamp, bool? hasLargeIcon, Uint8List? largeIcon, bool? canTap})
- NotificationEvent.fromMap(Map map)
-
Create the event from a map
factory
Properties
-
actions
↔ List<
Action> ? -
actions of notification
getter/setter pair
- canTap ↔ bool?
-
if this notification can be tapped
getter/setter pair
- channelId ↔ String?
-
the channel id of the notification
getter/setter pair
- createAt ↔ DateTime?
-
the notification create time in flutter side
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasLargeIcon ↔ bool?
-
icon of the notification which setted by setSmallIcon,
at most time this is icon of the application package.
So no need to set this, use a method to take from android.
To display as a image use the Image.memory widget.
Example:
getter/setter pair
- id ↔ int?
-
the notification id
getter/setter pair
- key ↔ String?
-
the key of status bar notification
getter/setter pair
- largeIcon ↔ Uint8List?
-
large icon of the notification which setted by setLargeIcon.
To display as a image use the Image.memory widget.
Example:
getter/setter pair
- message ↔ String?
-
DEPRECATE
getter/setter pair
- packageName ↔ String?
-
the package name of the notification
getter/setter pair
- raw → Map?
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text ↔ String?
-
the content of the notification
getter/setter pair
- timestamp ↔ int?
-
the nofication create time in the android side
getter/setter pair
- title ↔ String?
-
the title of the notification
getter/setter pair
- uid ↔ int?
-
the uid of status bar notification
getter/setter pair
- uniqueId ↔ String?
-
generate the unique id for notification
generated by plugin
getter/setter pair
Methods
-
getFull(
) → Future - get full notification
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
tap(
) → Future< bool> - tap the notification return false if not exits
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited