ready method
Initialize plugin for prepare requestPositionUpdate
Before call requestPositionUpdate must call ready() to get current plugin state. In android when user use back button quit app, flutter will shutdown all dart code. use ready() notify plugin and check whether the last position update is sill tracking, and get positions updates in plugin cache.
No position updated event will send if miss called ready()
Implementation
@override
Future<SBGLState> ready() async {
try {
var result = (await methodChannel
.invokeMapMethod<String, dynamic>(Methods.ready))!;
return SBGLState.fromMap(result);
} on PlatformException catch (e) {
final error = _handlePlatformException(e);
throw error;
}
}