UpdatableMx<T> mixin

Superclass constraints
Mixin applications

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slowly → Slowly<Object>
no setterinherited
stream Stream<T>
get value's stream
no setterinherited
value → T
get current value
no setterinherited

Methods

debounceMs<R>(Object tag, R func, {int ms = 200}) Future<R?>
inherited
dispose() → void
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(T value) → T
put new value
inherited
putError(Object error, [StackTrace? stackTrace]) → void
put new error
inherited
runCatching<R>(FutureOr<R?> block(), {FutureOr<R?> onSuccess(R data)?, FutureOr<R?> onFailure(Object e, StackTrace s)?, dynamic ignoreSkipError = true}) FutureOr<R?>
ignoreSkipError same as update((o)=>null) true: SkipError will not trigger onFailure when true ref skpIf/skpNull
inherited
skpIf(bool condition, String reason) → void
if you want interrupt the normal flow, but not trigger runCatching.onFailure
inherited
skpIfNull(Object? obj, String reason) → void
if obj ==null, throw SkipError ref skpIf
inherited
skpNull<T>(T? obj, String reason) → T
if obj == null: throw SkipError else: return obj!
inherited
toString() String
A string representation of this object.
inherited
update(FutureOr<T> update(T old), {dynamic onError(Object e, StackTrace s)?, int slowlyMs = 100, Object? debounceTag, Object? throttleTag, dynamic ignoreSkipError = true}) FutureOr<T?>
update if return value, will call put if return null, will not call put/putError onError if set null,will call putError if set function value, will not call putError, you can invoke putError manually slowlyMs if set <=0 value, will ignore debounce/throttleTag debounceTag enable debounce, require unique within the VM scope throttleTag enable throttle, require unique within the VM scope ignoreSkipError ref runCatching.ignoreSkipError
updateRaw(FutureOr<T> up(T old), {dynamic onError(Object e, StackTrace s)?, int slowlyMs = 100, Object? debounceTag, Object? throttleTag, dynamic ignoreSkipError = true}) FutureOr<T?>
Deprecated use 'update'

Operators

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