LiveData<T> class

数据持有者类,可以在给定的生命周期内观察到

Implementers

Constructors

LiveData()

Properties

foreverStream → Stream<T>
获取永续的数据流对象 [...]
read-only
hasActiveObserves → bool
是否存在活动的观察者,活动观察者指观察者生命周期处于LifecycleState.resumed并且Stream存在至少一个监听者
read-only
value → T
当前的数据
read-only
version → int
当前数据版本
read-only
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

of(LifecycleOwner owner) → Stream<T>
获取一个数据流对象用于监听LiveData数据变化 [...]
onActive() → void
当活动观察者从0变为1时调用 [...]
@protected
onInactive() → void
当活动观察者从1变为0时调用 [...]
@protected
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

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