reset method

Future<void> reset ()

Implementation

Future<void> reset() async {
  await _nativeSetup.future;
  if (state == FijkState.end) {
    FijkLog.e("$this invoke reset invalid state:$state");
    return Future.error(StateError("call reset on invalid state $state"));
  } else {
    _callId += 1;
    int cid = _callId;
    FijkLog.i("$this invoke reset #$cid");
    await _channel.invokeMethod("reset").then((_) {
      FijkLog.i("$this invoke reset #$cid -> done");
    });
    _setValue(
        FijkValue.uninitialized().copyWith(fullScreen: value.fullScreen));
  }
}