startScan method

void startScan()

Implementation

void startScan() {
  if (model!.state == ScanState.scanStateScanning) {
    return;
  }
  model!.state = ScanState.scanStateScanning;
  showLoading(currentContext, '扫描中');

  UnitsForNetwork.postHttpForDevice(
    beginScanApi,
    parameters: {},
    onSuccess: (response) {
      jobId = response["jobId"];
      pollScanResults();
    },
    onError: (error) {},
  );
}