withJwt static method

Future<GoogleVision> withJwt(
  1. String credentials,
  2. [String scope = 'https://www.googleapis.com/auth/cloud-platform']
)

Authenticated with JWT.

Implementation

static Future<GoogleVision> withJwt(String credentials,
    [String scope = 'https://www.googleapis.com/auth/cloud-platform']) async {
  GoogleVision yt = GoogleVision();

  tokenGenerator =
      JwtGenerator(credentials: credentials, scope: scope, dio: dio);

  await _confirmToken();

  return yt;
}