ReactiveString class

A specialized implementation of Reactive for String values.

It extends the Reactive class and provides specific functionality for String values. Use this class when you need a reactive String variable that can be observed for changes.

Inheritance

Constructors

ReactiveString(String value)
Creates a new instance of ReactiveString with the initial value.

Properties

hashCode int
The hash code for this object.
no setterinherited
listeners List<Function>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
Retrieves the current value of the reactive variable.
getter/setter pairinherited
valueNotifier ValueNotifier<String>
no setterinherited

Methods

addListener(dynamic listener(String value), {String? listenerName}) → dynamic
Adds a listener to the list of listeners to a Reactive variable The listener function will be called with the current value gets changed. @param listener The listener function to add.
inherited
bindStream(Stream<String> stream) → void
destinationReactive.bindStream(sourceStream) here, the value of Reactive variable destination will be updated and refresh the dependent Observers, whenever a new value is emitted from sourceStream.
inherited
close() → void
Returns a ReactiveNotifier object associated with this Reactive instance. The ReactiveNotifier allows listening to changes in the reactive variable. Closes the underlying stream controller.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refresh() → void
Triggers an update by emitting the current value and help update Observer widget.
inherited
removeAllListeners() → dynamic
Removes all the listeners from a Reactive variable
inherited
removeListener({required String listenerName}) → dynamic
remove a particular listener with name specified previously
inherited
toString() String
A string representation of this object.
inherited

Operators

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