# startCroppingScreen static method

Future<ResultWrapper<DocumentData>> startCroppingScreen(

1. CroppingConfiguration config

)

Launches the Ready-to-Use V2 Cropping Screen as a full-screen modal dialog.

This method allows users to crop and adjust documents detected in a scanning session.

`config`: A `CroppingConfiguration` object defining the cropping screen's appearance and behavior.

Returns: A `Future` that resolves to a `ResultWrapper<DocumentData>` containing the cropped document data or an error if the operation fails.

## Implementation

    static Future<ResultWrapper<DocumentData>> startCroppingScreen(
        CroppingConfiguration config) async {
      try {
        var result = await ScanbotSdk.channel
            .invokeMethod('startCroppingScreenV2', config.toJson());
        return ResultWrapper.fromJson(jsonDecode(result),
            fromJsonT: (data) =>
                DocumentData.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());
      }
    }