NotificationCenter class
A singleton. It takes care of subscribe observers, and post notifications.
Constructors
- NotificationCenter()
-
factory
- NotificationCenter.internal()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isPaused(
String notificationId) → bool -
Whether all the subscribers of
notificationId
are currently paused. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify<
T> (String notificationId, {T? data}) → void - Posts a given notification.
-
pause(
String notificationId) → void -
Pause all the subscribers of
notificationId
-
resume(
String notificationId) → void -
Resumes all the subscribers of
notificationId
after a pause. -
subscribe<
T> (String notificationId, void callback(T)) → NotificationSubscription -
Adds to the center a subscriber for
notificationId
. -
toString(
) → String -
A string representation of this object.
inherited
-
unsubscribe(
String notificationId) → Future< void> -
Remove from the center the subscribers of
notificationId
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited