BroadcastProvider class
Provider of ControlBroadcast.
Global stream to broadcast data and events. Stream is driven by keys and object types.
Default broadcast is created with ControlFactory and is possible to use it via BroadcastProvider.
Constructors
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
broadcast<
T> ({dynamic key, dynamic value, bool store = false}) → void -
Sends
valueto global object stream. Subs with samekeyandvaluetype will be notified.store- storesvaluefor future subs and notifies them immediately after subscribe. -
broadcastEvent<
T> ({dynamic key}) → void -
Sends event to global event stream.
Subs with same
keywill be notified. -
subscribe<
T> (dynamic key, ValueChanged< T?> onData) → BroadcastSubscription<T> -
Subscribe to global object stream for given
keyand Type.onDatacallback is triggered when broadcast with specifiedkeyand correctvalueis called.currentwhen object for givenkeyis stored from previous broadcast, thenonDatais notified immediately. -
subscribeEvent(
dynamic key, VoidCallback callback) → BroadcastSubscription -
Subscribe to global event stream for given
key.callbackis triggered when broadcast or broadcastEvent with specifiedkeyis called.