configureOnDeviceOCR method
Future<void>
configureOnDeviceOCR({
- String? apiKey,
- String? token,
- required ModelClass modelClass,
- required ModelSize modelSize,
Implementation
Future<void> configureOnDeviceOCR(
{String? apiKey,
String? token,
required ModelClass modelClass,
required ModelSize modelSize}) async {
await _channel.invokeMethod('configure', {
'apiKey': apiKey,
'token': token,
'modelClass': switch (modelClass) {
ModelClass.shippingLabel => 1,
ModelClass.billOfLading => 2,
ModelClass.itemLabel => 3,
ModelClass.documentClassification => 4,
},
'modelSize': switch (modelSize) {
ModelSize.nano => 1,
ModelSize.micro => 2,
ModelSize.small => 3,
ModelSize.medium => 4,
ModelSize.large => 5,
ModelSize.xlarge => 6,
}
});
}