getAppState method
Implementation
@override
Future<AppState> getAppState() async {
final stateInt = await methodChannel.invokeMethod<int>('getAppState');
switch (stateInt) {
case 0:
return AppState.foreground;
case 1:
return AppState.background;
case 2:
return AppState.killState;
default:
return AppState.unknown;
}
}