start method

Implementation

Future<WitsystemScanResult> start() async {
  var options = ScanOptions(
      strings: {'flash_on': flashOn, 'flash_off': flashOff},
      autoEnableFlash: autoEnableFlash,
      android: const AndroidOptions(
        aspectTolerance: 1,
        useAutoFocus: true,
      ));
  var scanResult = await BarcodeScanner.scan(options: options);
  return WitsystemScanResult(
      type: scanResult.type.name,
      rawContent: scanResult.rawContent,
      format: scanResult.format.name,
      formatNote: scanResult.formatNote);
}