EventSubscriptionBuilder<T> class
abstract
Builder that is able to subscribe to the Mediator.
This is a builder pattern that allows you to manipulate the T
event
before it reaches the handler defined in either subscribe or subscribeFunction.
To transform the events map can be used.
To filter the events where can be used.
- Implementers
- Available extensions
Constructors
- EventSubscriptionBuilder()
- EventSubscriptionBuilder.create(EventHandlerStore store)
-
Creates a new EventSubscriptionBuilder this can be used to mutate
the events before they reach the EventHandler using the builder pattern.
factory
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
-
asyncExpand(
Stream< T> convert(T element)) → EventSubscriptionBuilder<T> - Transforms each element of this handler into a sequence of elements.
-
asyncMap<
S> (Future< S> mapper(T event)) → EventSubscriptionBuilder<S> - Transforms each event.
-
cast<
S> () → EventSubscriptionBuilder< S> - Transforms each event.
-
distinct(
[bool equals(T previous, T next)?]) → EventSubscriptionBuilder< T> - Skips data events if they are equal to the previous data event.
-
expand(
Iterable< T> convert(T element)) → EventSubscriptionBuilder<T> - Transforms each element of this handler into a sequence of elements.
-
map<
S> (S mapper(T event)) → EventSubscriptionBuilder< S> - Transforms each event.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
subscribe(
EventHandler< T> handler) → EventSubscription -
Subscribes to the given
handler
. -
toString(
) → String -
A string representation of this object.
inherited
-
where(
bool test(T event)) → EventSubscriptionBuilder< T> - Filters the events
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited