RxImpl<T> class
abstract
Base Rx class that manages all the stream logic for any Type.
- Inheritance
-
- Object
- Listenable
- ListNotifier
- SintListenable<
T> - RxImpl
- Mixed-in types
- Implementers
Constructors
- RxImpl(T initial)
Properties
- firstRebuild ↔ bool
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isDisposed → bool
-
no setterinherited
- listenersLength → int
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sentToStream ↔ bool
-
getter/setter pairinherited
-
stream
→ Stream<
T> -
no setterinherited
- string → String
-
Same as
toString()but using a getter.no setterinherited -
subject
→ StreamController<
T> -
no setterinherited
- value ↔ T
-
The current value of the object. When the value changes, the callbacks
registered with addListener will be invoked.
getter/setter pairinherited
Methods
-
addError(
Object error, [StackTrace? stackTrace]) → void -
addListener(
SintStateUpdate listener) → Disposer -
Register a closure to be called when the object notifies its listeners.
inherited
-
addListenerId(
Object? key, SintStateUpdate listener) → Disposer -
inherited
-
bindStream(
Stream< T> stream) → void -
Binds an existing
Stream<T>to thisRx<T>to keep the values in sync. You can bind multiple sources to update the value. Closing the subscription will happen automatically when the observer Widget (SINTorObx) gets unmounted from the Widget tree.inherited -
call(
[T? v]) → T -
Makes a direct update of value adding it to the Stream
useful when you make use of Rx for custom Types to refresh your UI.
inherited
-
close(
) → void -
Close the Rx Variable
inherited
-
containsListener(
SintStateUpdate listener) → bool -
inherited
-
dispose(
) → void -
inherited
-
listen(
void onData(T)?, {Function? onError, void onDone()?, bool? cancelOnError}) → StreamSubscription< T> -
Calls
callbackwith current value, when the value changes.inherited -
listenAndPump(
void onData(T event), {Function? onError, void onDone()?, bool? cancelOnError}) → StreamSubscription< T> -
Returns a StreamSubscription similar to listen, but with the
added benefit that it primes the stream with the current value, rather
than waiting for the next value. This should not be called in
onInitor anywhere else during the build process.inherited -
map<
R> (R mapper(T? data)) → Stream< R> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
) → void -
inherited
-
refreshGroup(
Object id) → void -
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
removeListenerId(
Object id, VoidCallback listener) → void -
inherited
-
reportAdd(
VoidCallback disposer) → void -
inherited
-
reportRead(
) → void -
inherited
-
toJson(
) → dynamic -
Returns the json representation of
value.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
trigger(
T v) → void -
Following certain practices on Rx data, we might want to react to certain
listeners when a value has been provided, even if the value is the same.
At the moment, we ignore part of the process if we
.call(value)with the same value since it holds the value and there's no real need triggering the entire process for the same value inside, but there are other situations where we might be interested in triggering this. -
update(
T fn(T? val)) → void - Uses a callback to update value internally, similar to refresh, but provides the current value as the argument. Makes sense for custom Rx types (like Models).
Operators
-
operator ==(
Object o) → bool -
This equality override works for _RxImpl instances and the internal
values.
inherited