setBrightnessLevelAction method

Future<void> setBrightnessLevelAction(
  1. int brightnessLevel, {
  2. GetDeviceDetailsMethod getDetails = DevicesRepository.getDeviceDetails,
  3. SendBrightnessFunction sendBrightnessLevel = BrightnessRepository.setBrightnessAction,
})

Implementation

Future<void> setBrightnessLevelAction(int brightnessLevel,
    {GetDeviceDetailsMethod getDetails = DevicesRepository.getDeviceDetails,
    SendBrightnessFunction sendBrightnessLevel =
        BrightnessRepository.setBrightnessAction}) {
  return performAction<int>(brightnessLevel, () => getBrightnessState,
      () => sendBrightnessLevel(_request, _deviceId, brightnessLevel),
      getDetails: getDetails);
}