EventBus class abstract

Implementers

Constructors

EventBus({bool isModelBus = false})
Factory constructor for EventBus. Creates an EventBusImpl instance.
factory

Properties

allEventStream Stream<(EventDTO, bool)>
Stream for all sent events (event DTO, and whether it had a listener or not)
no setter
hashCode int
The hash code for this object.
no setterinherited
isModelBus bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

haveHandler<T>({String? path, String? target}) bool
Returns true if the bus contains a handler for the specified topic
haveListener<T>({String? path, String? target}) bool
Returns true if the bus contains a listener for the specified topic
lastData<T>({String? path, String? target}) → T?
Gets the last data sent to a specific topic.
listen<T>({String? path, String? target}) Stream<T>
Listens to events on a specific topic. Returns a Stream of the data type T.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send<T>(T data, {String? path, String? fragment, String? target, Map<String, String>? arguments}) Future?
Sends an event to the bus. If a handler exists for the topic, it will be called. Returns a Future that completes with the result if EventDTO.completer was called by the handler.
toString() String
A string representation of this object.
inherited

Operators

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