# startDocumentScanner static method

Future<DocumentScanningResult> startDocumentScanner(

1. DocumentScannerConfiguration config

)

Starts the Ready-to-Use Document Scanner UI as full-screen modal UI dialog. The Document Scanner provides guided, automatic document scanning.

## Implementation

    static Future<DocumentScanningResult> startDocumentScanner(
        DocumentScannerConfiguration config) async {
      try {
        var result = await _invoke('startDocumentScanner', config.toJson());
        if (_wasCanceled(result)) {
          return DocumentScanningResult.canceled();
        }
        return DocumentScanningResult.fromJson(jsonDecode(result));
      } catch (e) {
        Logger.root.severe(e);
        return DocumentScanningResult.error(e.toString());
      }
    }