handleResult method

Future<AskarCallbackResult> handleResult(
  1. int initialResult
)

Handles the result of the callback.

Returns a Future that completes with the AskarCallbackResult.

Implementation

Future<AskarCallbackResult> handleResult(int initialResult) {
  final initialErrorCode = ErrorCode.fromInt(initialResult);

  if (initialErrorCode != ErrorCode.success) {
    completer.complete(AskarCallbackResult(initialErrorCode, false, null));

    this.nativeCallable.close();
  }

  return this.completer.future;
}