ObservableComponent<T> mixin
Mixin implementation of ObservableValue to enhance ControlModel. In most of cases used with BaseModel to create observable model.
- Superclass constraints
- Implemented types
- Available extensions
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- internalData ↔ dynamic
-
Serves for internal data or marker.
Exposed to public API due to usage as custom 'client' data.
getter/setter pairoverride
- preferSoftDispose ↔ bool
-
requestDispose will execute softDispose. Useful for items in list and objects stored in ControlFactory. Final dispose must be handled manually.
getter/setter pairinherited
- preventDispose ↔ bool
-
requestDispose do nothing if set. Final dispose must be handled manually.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T?
-
Current value of this observable.
getter/setter pairoverride-getter
Methods
-
cancel(
ControlSubscription< T?> subscription) → void -
Cancels given
subscription.override -
cast<
U> () → ObservableValue< U> -
Available on ObservableValue, provided by the ObservableValuExt extension
Cast this observable. -
dispose(
) → void -
Used to clear and dispose object.
Unsubscribe and close all sources. Prepare object for GC.
Can be called multiple times!
override
-
disposeWith(
DisposeObserver observer) → void -
Available on Disposable, provided by the DisposableExt extension
Register for dispose with givenobserver. -
init(
Map args) → void -
Init is typically called right after constructor.
args- these arguments are typically passed through factory.inherited -
listen(
VoidCallback action) → ControlSubscription< T?> -
Subscribe to listen future changes.
Returns ControlSubscription for later connection close.
override
-
merge(
Object other) → ObservableGroup -
Available on ObservableBase, provided by the ObservableBaseExt extension
Creates new group, that listens to both observables. -
mount(
Object? object) → void -
Used to register interface/handler/notifier etc.
Can be called multiple times with different objects!
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notify(
) → void -
Notify this object to propagate changes.
override
-
requestDispose(
[Object? sender]) → void -
Executes dispose based on preventDispose and preferSoftDispose settings.
sender- actual object that requesting dispose - can be null.inherited -
setValue(
T? value, {bool notify = true, bool forceNotify = false}) → void -
softDispose(
) → void -
Just soft dispose - stop loading / subscriptions etc.
For example called when List item hides and is recycled.
Also useful when Control is used with multiple Widgets to prevent fatal dispose.
inherited
-
subscribe(
ValueCallback< T?> action, {bool current = true, dynamic args}) → ControlSubscription<T?> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
wrap<
U> (ObservableValue< U> other, {T converter(U value)?, bool autoDispose = true}) → ControlSubscription<U>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited