toggleVibrator method
- required dynamic deviceId,
- required bool enabled,
Toggles the vibrator on or off based on the enabled
flag.
deviceId
- The identifier of the target device.
enabled
- A boolean indicating whether to enable or disable the vibrator.
Implementation
Future<CommandResponse> toggleVibrator(
{required deviceId, required bool enabled}) async {
return sendCommand(deviceId, enabled ? vibratorEnabled : vibratorDisabled);
}