ProEventEmitter<T extends Object> class
ProEventEmitters provide two ways for an object to listen to changes. Either by providing a callback, or by listening to an event stream.
Listening to the eventStream allows the use of StreamBuilder
widgets
in Flutter
- Implementers
Constructors
Properties
-
callbacks
↔ Map<
String, List< void Function(ProEvent< >T> event)> -
getter/setter pair
-
eventStream
↔ StreamController<
ProEvent< T> > -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void -
dispose(
) → void -
emit(
String event, [T? data]) → void - emit will always emit twice... first, by the name of the event submitted, and secondly, by the name of the special event 'all'
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on(
String event, void callback(ProEvent< T> event)) → ProEventObserver - set a callback for events of this type.
-
stream(
String event) → Stream< ProEvent< Object> > -
listen to an event on this ProEventEmitter as a stream. An
ProEvent
will be emitted whenever the event by this name is emitted. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited