LifecycleUtil class abstract

app生命周期管理类

使用方式:

LifecycleUtil.addLifeCycleListener((lifecycle) {
  print(lifecycle);
});

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Methods

addLifeCycleListener(void onData(AppLifecycle)?, {Function? onError, void onDone()?, bool? cancelOnError}) StreamSubscription
添加生命周期监听 onData 生命周期回调 onError 错误回调 onDone 完成回调 cancelOnError 是否在错误时取消监听