mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 09:45:22 +00:00
Refactor device control logic and add temperature and fan speed enums
- Refactor device control logic in the app to improve readability and maintainability. - Add temperature modes (hot, cold, wind) and fan speeds (auto, low, middle, high) enums. - Update icon mappings and utility functions for temperature modes and fan speeds.
This commit is contained in:
@ -23,7 +23,7 @@ class DevicesDefaultSwitch extends StatelessWidget {
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
DevicesCubit.get(context).turnOnOffDevice(model);
|
||||
DevicesCubit.getInstance().turnOnOffDevice(model);
|
||||
},
|
||||
child: Container(
|
||||
height: 60,
|
||||
@ -49,7 +49,7 @@ class DevicesDefaultSwitch extends StatelessWidget {
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
DevicesCubit.get(context).turnOnOffDevice(model);
|
||||
DevicesCubit.getInstance().turnOnOffDevice(model);
|
||||
},
|
||||
child: Container(
|
||||
height: 60,
|
||||
|
Reference in New Issue
Block a user