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

BroadcastProvider()

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 value to global object stream. Subs with same key and value type will be notified. store - stores value for future subs and notifies them immediately after subscribe.
broadcastEvent<T>({dynamic key}) → void
Sends event to global event stream. Subs with same key will be notified.
subscribe<T>(dynamic key, ValueChanged<T?> onData) BroadcastSubscription<T>
Subscribe to global object stream for given key and Type. onData callback is triggered when broadcast with specified key and correct value is called. current when object for given key is stored from previous broadcast, then onData is notified immediately.
subscribeEvent(dynamic key, VoidCallback callback) BroadcastSubscription
Subscribe to global event stream for given key. callback is triggered when broadcast or broadcastEvent with specified key is called.