LiveStream class
CREDITS https://pub.dev/packages/livestream
LiveStream is a class which can be used to share data values among different modules in your application. It makes easy to provide communication among different parts of your application. It's a data holder class which can be created and used anywhere in application. By using it, You can emit values to any stream with data value from anywhere in the application. Observers will receive data events when the value of subscribed stream is updated.
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
-
dispose(
dynamic key) → void - Remove key from HashMap
-
disposeAllKeys(
) → void - Remove all keys from HashMap
-
emit(
String stream, [dynamic value]) → void -
Sets a new value
value
to the data streamstream
. If there are active subscribers, the value will be dispatched to them. -
getValue(
String stream) → Object? -
Returns the current value of a given data
stream
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on(
String stream, void callback(Object)?) → void -
Subscribes to the given stream
stream
. If stream already has data set, it will be delivered to thecallback
function. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited