# detectDocument method

Future<DetectDocumentResult> detectDocument(

1. String imageUri

)

Detect document on image file path.

## Implementation

    Future<DetectDocumentResult> detectDocument(String imageUri) async {
      try {
        var operationParamsMap = <String, dynamic>{"imageUri": imageUri};

        var result = await ScanbotSdk.channel
            .invokeMethod('detectDocumentOnImage', operationParamsMap);

        return DetectDocumentResult.fromJson(jsonDecode(result));
      } catch (e) {
        Logger.root.severe(e);
        rethrow;
      }
    }