Skip to content

Show scanner

After initialization is completed and the scenario is set, you can start document scanning process and handle scanning actions:

DocumentReader.showScanner()

@override
void initState() {
super.initState();

initPlatformState();

EventChannel('flutter_document_reader_api/event/completion')
    .receiveBroadcastStream()
    .listen((jsonString) => this.handleCompletion(
        DocumentReaderCompletion.fromJson(json.decode(jsonString))));
}

void handleCompletion(DocumentReaderCompletion completion) {
  if (completion.action == DocReaderAction.COMPLETE) {

  }
}