EventTaxi class Null safety

Dispatches events to listeners using the Dart Stream API. The EventTaxi enables decoupled applications. It allows objects to interact without requiring to explicitly define listeners and keeping track of them.

The EventTaxi dispatches Event and distributes it to all listeners A Event is a normal Dart objects the implements the Event interface.

Implementers

Constructors

EventTaxi()

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

close() → void
Cancels all internals Sink's a closed event bus should not be used. Doing so will result in AssertionError.
fire<T extends Event>(T event) → void
Fires a new event to everyone registered for events of type T. You can simply create an event by subclassing Event: [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
registerAll([bool includeLastEvent = false]) Stream<Event>
Listens for events of all subtypes of Event. [...]
registerTo<T extends Event>([bool includeLastEvent = false]) Stream<T>
Listens for events of Type Event and its subtypes. [...]
toString() String
A string representation of this object. [...]
inherited

Operators

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