EventHub class

Dispatch and listen events everywhere using Dart Stream API. Also know as Event Bus.

Constructors

EventHub({bool sync = false})
Create a EventHub

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

destroy() → void
You don't have to destroy it explicitly
fire(String name, [dynamic data]) → void
Fire a event, which will notify all the event listeners that listen to the event name. You can also pass an optional data
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on(String name, void callback(dynamic)) StreamSubscription
Register a event listener. The callback will be called once the name is fired.
toString() String
A string representation of this object.
inherited

Operators

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