start method

Implementation

Future<DocumentDetectorEvent> start() async {
  Map<String, dynamic> params = {};

  params['mobileToken'] = mobileToken;
  params['captureFlow'] = captureFlow.map((e) => e.asMap()).toList();
  params['personId'] = personId;
  params['urlExpirationTime'] = urlExpirationTime;
  params['useAnalytics'] = useAnalytics;
  params['displayPopup'] = displayPopup;
  params['enableDelay'] = enableDelay;
  params['millisecondsDelay'] = millisecondsDelay;
  params['secondsDelay'] = secondsDelay;
  params['requestTimeout'] = requestTimeout;
  params['stage'] = stage?.stringValue;
  params['countryCodeList'] =
      countryCodeList?.map((e) => e.stringValue).toList();
  params['uploadSettings'] = uploadSettings?.asMap();
  params['previewSettings'] = previewSettings?.asMap();
  params['messageSettings'] = messageSettings?.asMap();
  params['androidSettings'] = androidSettings?.asMap();
  params["iosSettings"] = iosSettings?.asMap();

  final result =
      await _documentDetectorMethodChannel.invokeMethod('start', params);

  return DocumentDetectorEvent.fromMap(result);
}