mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
change themostat widget
This commit is contained in:
@ -4,7 +4,6 @@ import 'package:syncrow_web/pages/device_managment/ac/bloc/ac_bloc.dart';
|
|||||||
import 'package:syncrow_web/pages/device_managment/ac/bloc/ac_event.dart';
|
import 'package:syncrow_web/pages/device_managment/ac/bloc/ac_event.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/ac/bloc/ac_state.dart';
|
import 'package:syncrow_web/pages/device_managment/ac/bloc/ac_state.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/ac/view/control_list/ac_mode.dart';
|
import 'package:syncrow_web/pages/device_managment/ac/view/control_list/ac_mode.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/ac/view/control_list/ac_toggle.dart';
|
|
||||||
import 'package:syncrow_web/pages/device_managment/ac/view/control_list/current_temp.dart';
|
import 'package:syncrow_web/pages/device_managment/ac/view/control_list/current_temp.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/ac/view/control_list/fan_speed.dart';
|
import 'package:syncrow_web/pages/device_managment/ac/view/control_list/fan_speed.dart';
|
||||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||||
@ -43,11 +42,21 @@ class AcDeviceControlsView extends StatelessWidget with HelperResponsiveLayout {
|
|||||||
mainAxisSpacing: 12,
|
mainAxisSpacing: 12,
|
||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
AcToggle(
|
ToggleWidget(
|
||||||
|
label: 'Thermostat',
|
||||||
value: state.status.acSwitch,
|
value: state.status.acSwitch,
|
||||||
code: 'switch',
|
code: 'switch',
|
||||||
deviceId: device.uuid!,
|
deviceId: device.uuid!,
|
||||||
icon: Assets.ac,
|
icon: Assets.ac,
|
||||||
|
onChange: (value) {
|
||||||
|
context.read<AcBloc>().add(
|
||||||
|
AcControlEvent(
|
||||||
|
deviceId: device.uuid!,
|
||||||
|
code: 'switch',
|
||||||
|
value: value,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
CurrentTemp(
|
CurrentTemp(
|
||||||
currentTemp: state.status.currentTemp,
|
currentTemp: state.status.currentTemp,
|
||||||
|
Reference in New Issue
Block a user