startScan static method

dynamic startScan()

Implementation

static startScan() async {
  _checkPermission().then((bluetoothMessage) async {
    switch (bluetoothMessage) {
      case 'bluetoothOff':
        beaconStateController.add(BeaconState.bluetoothOff);
        break;
      case 'bluetoothOn':
        _methodChannel.invokeMethod('startScan');
        break;
      case 'bluetoothPermissionFailed':
        beaconStateController.add(BeaconState.bluetoothPermissionFailed);
        break;
      default:
        beaconStateController.add(BeaconState.scanFailed);
        break;
    }
  });
}