LifecycleObserver class

组件生命周期监听器

#生命周期流程


onCreate

   ↓

onResume

   ↓ ↑

onPause

   ↓

onDestroy

Constructors

LifecycleObserver({VoidCallback onCreate: null, VoidCallback onResume: null, VoidCallback onPause: null, VoidCallback onDestroy: null })
新建一个生命周期监听器 [...]
const

Properties

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

onCreate() → void
组件初始化生命周期 [...]
@protected
onDestroy() → void
组件销毁生命周期 [...]
@protected
onPause() → void
组件分离转入后台生命周期 [...]
@protected
onResume() → void
组件加载完成前台显示生命周期 [...]
@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