FlowR<T> class
abstract
FlowR --- Basic mixin --- BaseFlowR 核心基础功能: 使用Stream传递数据 UpdatableMx 提供 update 方法, 自动捕获异常 LoggableMx 打印putError的异常于StackTrace
开箱即用的 FlowR基类
注意:
- Inheritance
- Mixed-in types
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- initValue → T
-
when
_subject
init, get seed valueno setter - logExtra → LogExtra?
-
set put log type
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
slowly
→ Slowly<
Object> -
no setterinherited
-
stream
↔ ValueStream<
T> -
subject.stream
getter/setter pairoverride-getter -
subject
→ BehaviorSubject<
T> -
no setter
- value → T
-
subject.value
no setteroverride
Methods
-
autoDispose<
T extends StreamSubscription?> (T subs, {String? tag}) → T -
inherited
-
debounceMs<
R> (Object tag, R func, {int ms = 200}) → Future< R?> -
inherited
-
dispose(
) → void -
dispose
_subject
override -
frPrint(
String message, {DateTime? time, int? sequenceNumber, int? level, String? name, Zone? zone, Object? error, StackTrace? stackTrace}) → dynamic -
inherited
-
logger(
String message, {LogExtra? logExtra, DateTime? time, int? sequenceNumber, int level = 0, String? name, Zone? zone, Object? error, StackTrace? stackTrace, bool uriFrame = true}) → dynamic -
logExtra
print stack frame infoname
logger.name null: and iflogExtra
==null: will use 'runtimeType' else: will use stack frame infostackTrace
will print with red color by dev.log but iferror
== null: will ignorestackTrace
inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
T value) → T -
put value to
_subject
override -
putError(
Object error, [StackTrace? stackTrace]) → void -
put error value to
_subject
override -
runCatching<
R> (FutureOr< R?> block(), {FutureOr<R?> onSuccess(R data)?, FutureOr<R?> onFailure(Object e, StackTrace s)?, dynamic ignoreSkipError = true}) → FutureOr<R?> -
run and catch error, then putError
override
-
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 skpIfinherited -
skpNull<
T> (T? obj, String reason) → T -
if
obj
== null: throw SkipError else: returnobj
!inherited -
subBy<
T extends StreamSubscription> (String tag) → T -
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 callput
if return null, will not callput
/putError
onError
if set null,will callputError
if set function value, will not callputError
, you can invokeputError
manuallyslowlyMs
if set <=0 value, will ignore debounce/throttleTagdebounceTag
enable debounce, require unique within the VM scopethrottleTag
enable throttle, require unique within the VM scopeignoreSkipError
refrunCatching.ignoreSkipError
inherited -
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'
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited