create static method

Future<TokenCredential> create({
  1. required Uri uri,
  2. required String username,
  3. required String password,
  4. int tokenExpirationInterval = 0,
})

Creates a TokenCredential to access a secured ArcGIS resource.

Parameters:

  • uri — The URL of the token-secured resource.
  • username — The case-sensitive username used to access the secured resource or retrieve a token.
  • password — The password used to access the secured resource or retrieve a token.
  • tokenExpirationInterval — The duration the token will remain valid, represented in minutes. The value must be greater than 0, otherwise the server default is used.

Return Value: Returns a TokenCredential.