PregeneratedTokenCredential constructor
Creates an instance of a PregeneratedTokenCredential.
Parameters:
Implementation
factory PregeneratedTokenCredential(
{required Uri uri,
required TokenInfo tokenInfo,
required String referer}) {
_initializeArcGISEnvironmentIfNeeded();
final coreURI = _CString(uri.toString());
final coreReferer = _CString(referer);
final handle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_PregeneratedTokenCredential_create(
coreURI.bytes, tokenInfo._handle, coreReferer.bytes, errorHandler);
});
final PregeneratedTokenCredential object =
PregeneratedTokenCredential._withHandle(handle);
object._tokenInfo.cache(tokenInfo);
return object;
}