resetSettings method

Future<bool> resetSettings(
  1. String deviceId
)

Resets the scanner settings to the default.

The deviceId specifies the BLE device whose settings will be reset.

Returns:

  • A boolean indicating whether the settings were successfully reset.

Implementation

Future<bool> resetSettings(String deviceId) async {
  try {
    final result = await _commandExecutorsManager.sendCommand(
        deviceId, ScannerCommand(bluetoothLowEnergyDefault));
    return result.succeeded;
  } catch (e) {
    _appLogger.error("Error resetting settings for device $deviceId: $e");
    rethrow;
  }
}