initializeGoogleVision method
Future<void>
initializeGoogleVision(
)
Implementation
Future<void> initializeGoogleVision() async {
final logLevel = _toLogLevel(globalResults!['log-level']);
_googleVision = await GoogleVision(
logLevel,
).withJwt(credentialsFromFile(File(globalResults!['credential-file'])));
imageFile = File(argResults!['image-file']);
imageBytes = await imageFile.readAsBytes();
if (argResults != null && argResults!['pages'] != null) {
pages = (argResults!['pages'] as String?)
?.split(',')
.map(int.parse)
.toList();
}
}