withJwt static method Null safety

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

Authenticated with JWT.

Implementation

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

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

  await _confirmToken();

  return yt;
}