prepareAsync method

Future<void> prepareAsync()

start the async preparing tasks

see fijkstate zh or fijkstate en for details

Implementation

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