withJwt method Null safety

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

authenticated with JWT

Implementation

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

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

  await _confirmToken();

  return yt;
}