EventNotifier class

Broadcasts named events to interested subscribers. When an event occurs, a method (callback) associated with the subscriber is executed.

Constructors

EventNotifier()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

count([String eventName]) int
Gets the number of named events if no eventName is specified. If an eventName is specified, returns the number of subscribed handlers for that named event.
getEventNotifier() EventNotifier
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notify(String eventName, [Map<String, dynamic> args]) → void
Notify each subscriber that the specified named event has occured. An optional map of arguments can be attached to the notification e.g. myEventNotifier.notify('valueChanged', {'age': 32);
remove(String eventName, NotificationCallback callback) → void
Remove the named event's callback
subscribe(String eventName, NotificationCallback method) → void
Subscribe the provided method (callback) to the specified named event.
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

test() → void
Test functionality, run EventNotifier.test()