createCancelable static method

CancelableOperation<OAuthUserCredential> createCancelable(
  1. {required OAuthUserConfiguration configuration}
)

Cancelable version of create. See that method for more information.

Implementation

static CancelableOperation<OAuthUserCredential> createCancelable(
    {required OAuthUserConfiguration configuration}) {
  _initializeArcGISEnvironmentIfNeeded();
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_OAuthUserCredential_createAsync(
        configuration._handle, errorHandler);
  });
  return taskHandle.toCancelableOperation(
      (element) => element.getValueAsOAuthUserCredential()!);
}