MovaLazyNetProbe class

按需创建真实探针;仅调用 allowHeavy 或读取 changes 才调用 factory。 未使用便销毁时不会创建探针。示例:MovaLazyNetProbe(makeProbe)。

Implemented types

Constructors

MovaLazyNetProbe(IMovaNetProbe factory())
保存探针工厂 factory,返回延迟创建的探针包装器。

Properties

changes → Stream<bool>
Emits a new verdict whenever connectivity changes.
no setteroverride
factory → IMovaNetProbe Function()
首次需要网络判定时调用的工厂;每个包装器最多创建一个实例。
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

allowHeavy() → Future<bool>
Whether heavy, optional traffic is currently acceptable.
override
dispose() → Future<void>
Releases any listeners this probe holds.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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