LoggableMx<T> mixin
使用logger 打印异常信息
- 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
-
stream
→ Stream<
T> -
no setterinherited
-
subject
→ StreamController<
T> -
no setterinherited
- value → T
-
no setterinherited
- valueOrNull → T?
-
如果没有初始值, 则value可能为null,使用valueOrNull避免抛出异常
no setterinherited
Methods
-
combineStream(
List< BaseHiveState> ? combines) → CombineLatestStream<dynamic, List> -
合并多个HiveState, 任意一个HiveState更新,都会产生新的event
返回值: List, 按顺序返回每一个Stream的最新的值; 由于每个Stream的类型可能不同, 所以类型为List
inherited
-
dispose(
) → void -
============== 以下是高级功能, 一般情况下无需使用 ==============
释放内存
inherited
-
logger(
String message, {DateTime? time, int? sequenceNumber, int level = 0, String? name, Zone? zone, Object? error, StackTrace? stackTrace}) → dynamic -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onCreate(
{T? initValue}) → StreamController< T> -
通过覆写onCreate,可以实现在首次创建subject时设置初始数据
T
实例 但如果初始值不是固定值, 则需要通过BaseHiveState.init
设置初始值T
实例 注意: 一般情况下, 是在Widget的initState方法中调用 put 值进行初始化;inherited -
put(
T value) → BaseHiveState< T> -
inherited
-
putError(
Object e, [StackTrace? s]) → BaseHiveState< T> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
valueToString(
T? value) → String -
putError中, 将会打印model值
value
覆写本函数, 返回需要打印的内容
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited