startVinScanner static method
- @Deprecated('Use ScanbotSdkUiV2.startVINScanner instead.')
Starts the Vehicle Identification Number (VIN) Scanner screen with the specified config
.
Returns a VinScannerResult wrapped in ResultWrapper.
Implementation
@Deprecated('Use ScanbotSdkUiV2.startVINScanner instead.')
static Future<ResultWrapper<VinScannerResult>> startVinScanner(
VinScannerScreenConfiguration config) async {
try {
var result =
await _channel.invokeMethod('startVinScanner', config.toJson());
return ResultWrapper.fromJson(jsonDecode(result),
fromJsonT: (data) =>
VinScannerResult.fromJson(data as Map<String, dynamic>));
} on PlatformException catch (e) {
Logger.root.severe(e);
return ResultWrapper.error(e.message ?? 'Unknown platform error');
} on Exception catch (e) {
return ResultWrapper.error(e.toString());
}
}