executeNormal<S, E extends Object> method

  1. @protected
Future<S> executeNormal<S, E extends Object>(
  1. FlutterRustBridgeTask<S, E> task
)
inherited

Execute a normal ffi call. Usually called by generated code instead of manually called.

Implementation

@protected
Future<S> executeNormal<S, E extends Object>(
    FlutterRustBridgeTask<S, E> task) {
  final completer = Completer<dynamic>();
  final sendPort = singleCompletePort(completer);
  task.callFfi(sendPort.nativePort);
  return completer.future.then((dynamic raw) => _transformRust2DartMessage(
      raw, task.parseSuccessData, task.parseErrorData, wire2apiPanicError));
}