startCroppingScreen static method
- @Deprecated('Use ScanbotSdkUiV2.startCroppingScreen instead.')
- Page page,
- CroppingScreenConfiguration config
Starts the Ready-to-Use Cropping UI as full-screen modal UI dialog.
The Cropping UI provides the functionality for manual cropping and rotation of the given page
.
Implementation
@Deprecated('Use ScanbotSdkUiV2.startCroppingScreen instead.')
static Future<CroppingResult> startCroppingScreen(
Page page, CroppingScreenConfiguration config) async {
try {
var arguments = config.toJson();
arguments['page'] = page.toJson();
var result =
await SharedCalls.invoke(_channel, 'startCroppingScreen', arguments);
if (SharedCalls.wasCanceled(result)) {
return CroppingResult.canceled();
}
return CroppingResult.fromJson(jsonDecode(result));
} catch (e) {
Logger.root.severe(e);
return CroppingResult.error();
}
}