toggle method

void toggle()

Implementation

void toggle() {
  if (widget.scannerState.scanIsInProgress) {
    widget.stopScan();
  } else {
    widget.startScan();
  }
}