prepareAsync method

Future<void> prepareAsync()

start the async preparing tasks

see fstate zh for details

Implementation

Future<void> prepareAsync() async {
  await _nativeSetup.future;
  if (state == FState.initialized) {
    FLog.i("$this invoke prepareAsync");
    await _channel.invokeMethod("prepareAsync");
  } else {
    FLog.e("$this prepareAsync invalid state:$state");
    return Future.error(StateError("prepareAsync on invalid state $state"));
  }
}