RxImpl<T> class

A proxy object class, for variables to turn into a watched one.

Implementers

Constructors

RxImpl(T _value)
Constructor: add self to the static rx container and sholud use setPub to set the Pub when the model initialized.
RxImpl.withPub(T _value, Pub? _pub)
Constructor: With dedicated Pub parameter

Properties

hashCode int
The hash code for this object.
no setterinherited
ob → T
Notify the host to rebuild related consumer widget and then return the underlying object.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
rxAspects Set<Object>
final
value ↔ dynamic
Getter:
getter/setter pair

Methods

addRxAspects([Object? aspects]) → void
Add aspects to the Rx aspects. param aspects: Iterable: add aspects to the rx aspects null: broadcast to the model RxImpl: add (aspects as RxImpl).rxAspects to the rx aspects : add aspects to the rx aspects
call(T v) → T
RxVar(newVal): set new value to the Rx underlying value. dart:call() works in the same way as operator()
clearRxAspects() → void
Clear all the Rx aspects.
consume(Widget create(), {Key? key}) Widget
Create a consumer widget and connect with the watched variable. The consumer widget will rebuild whenever the watched variable updates.
copyInfo(RxImpl<T> other) → void
Copy info from another Rx variable.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify() → void
Synonym of publishRxAspects().
publishRxAspects() → void
Publish Rx aspects to the host.
removeRxAspects([Object? aspects]) → void
Remove aspects from the Rx aspects. param aspects: Iterable: remove aspects from the rx aspects null: don't broadcast to the model RxImpl: remove (aspects as RxImpl).rxAspects from the rx aspects : remove aspects from the rx aspects
retainRxAspects(Object aspects) → void
Retain aspects in the Rx aspects. param aspects: Iterable: retain rx aspects in the aspects RxImpl: retain rx aspects in the (aspects as RxImpl).rxAspects : retain rx aspects in the aspects
toString() String
A string representation of this object.
override
touch() → void
Activate automatic aspect management for this watched variable.

Operators

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

Static Properties

rxTagCounter int
getter/setter pair
statePub Pub?
in case member variables initialized inside constructor, or member functions.
getter/setter pair
stateRxAutoAspectFlag bool
getter/setter pair
stateRxAutoAspects List<Object>
getter/setter pair
stateWidgetAspects Iterable<Object>?
static aspects and the flag of if enabled
getter/setter pair
stateWidgetAspectsFlag bool
getter/setter pair
staticRxContainer List<RxImpl>
final

Static Methods

clearRxAutoAspects() → void
disableAndClearRxAutoAspect() → void
disable RxAutoAspectFlag And clear RxAutoAspects
disableCollectAspect() → void
disable auto add static aspects to aspects of rx - by getter
disableRxAutoAspect() → void
disableVarCollect() → void
enableCollectAspect(Iterable<Object>? widgetAspects) → void
enable auto add static aspects to aspects of rx - by getter
enableRxAutoAspect() → void
enableVarCollect(Pub pub) → void
getAndDisableRxAutoAspect() List<Object>
getRxAutoAspects() List<Object>
setPub(Pub pub) → void
set observer for each rx variable