getLastRunEndState method
Returns the end state of the previous run of the application.
Implementation
@override
Future<LastRunEndState> getLastRunEndState() async {
final lastRunEndState =
await methodChannel.invokeMethod<int>(_getLastRunEndStateMethodName);
switch (lastRunEndState) {
case 1:
return LastRunEndState.crash;
case 2:
return LastRunEndState.cleanExit;
default:
return LastRunEndState.invalid;
}
}