# startGenericDocumentRecognizer static method

Future<GenericDocumentWrappedResults> startGenericDocumentRecognizer(

1. GenericDocumentRecognizerConfiguration config

)

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

## Implementation

    static Future<GenericDocumentWrappedResults> startGenericDocumentRecognizer(
        GenericDocumentRecognizerConfiguration config) async {
      try {
        var result =
            await _invoke('startGenericDocumentRecognizer', config.toJson());
        if (_wasCanceled(result)) {
          return GenericDocumentWrappedResults.canceled();
        }
        var genericResult = GenericDocumentResults.fromJson(jsonDecode(result));
        return GenericDocumentWrappedResults.fromGenericDocumentResults(
            genericResult);
      } catch (e) {
        Logger.root.severe(e);
        return GenericDocumentWrappedResults.error(e.toString());
      }
    }