FlowLog class

Constructors

FlowLog({String name = "system", String id = "", List<Log>? logs, Duration? timeout = const Duration(seconds: 30)})

Properties

createdAt DateTime?
getter/setter pair
desc FlowLogDesc
no setter
endAt DateTime?
no setter
endTimeText String
no setter
expireTime DateTime
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
id,可不传,默认为空,在name冲突时作为唯一标识
final
isTimeout bool
no setter
latestTime DateTime?
no setter
logs List<Log>?
getter/setter pair
logsDesc String
no setter
name String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shareText String
no setter
startTimeText String
no setter
timeout Duration?
超时时间,如果超过这个时间就算作一个新Flow
final
timer Timer?
getter/setter pair

Methods

add(dynamic log) → dynamic
添加一个常规log
end([dynamic log, LogType? type]) → dynamic
结束当前Flow
error(dynamic log) → dynamic
添加一个Error log
log(dynamic log) → dynamic
添加一个常规log
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Static Methods

addGlobalListener(void listener(FlowLogEvent, FlowLog)) → dynamic
clearGlobalListener() → dynamic
of(String name, [Duration? initTimeOut]) FlowLog
通过name获取一个正在进行的Flow,如果flow还没有创建,那么就创建一个新的再返回
ofNameAndId(String name, {Duration? initTimeOut, String id = ''}) FlowLog
通过name获取一个正在进行的Flow,如果flow还没有创建,那么就创建一个新的再返回 此方法可以额外指定一个id,在name相同时,使用id判断是否是同一个flow
removeGlobalListener(void listener(FlowLogEvent, FlowLog)) → dynamic