mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-25 18:37:55 +00:00
fiz wizard issue
This commit is contained in:
@@ -3,7 +3,6 @@ import 'package:dio/dio.dart';
|
||||
import 'package:firebase_database/firebase_database.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_app/features/app_layout/bloc/home_cubit.dart';
|
||||
|
||||
import 'package:syncrow_app/features/devices/bloc/two_touch_bloc/two_touch_event.dart';
|
||||
import 'package:syncrow_app/features/devices/bloc/two_touch_bloc/two_touch_state.dart';
|
||||
import 'package:syncrow_app/features/devices/model/device_control_model.dart';
|
||||
@@ -30,14 +29,14 @@ class TwoTouchBloc extends Bloc<TwoTouchEvent, TwoTouchState> {
|
||||
relay_status_2: status.off,
|
||||
);
|
||||
Timer? _timer;
|
||||
|
||||
|
||||
bool twoTouchGroup = false;
|
||||
List<DeviceModel> devicesList = [];
|
||||
List<GroupTwoTouchModel> groupTwoTouchList = [];
|
||||
bool allSwitchesOn = true;
|
||||
bool toggleSchedule = true;
|
||||
List<String> selectedDays = [];
|
||||
|
||||
|
||||
bool createSchedule = false;
|
||||
List<ScheduleModel> listSchedule = [];
|
||||
|
||||
@@ -586,12 +585,9 @@ class TwoTouchBloc extends Bloc<TwoTouchEvent, TwoTouchState> {
|
||||
|
||||
emit(UpdateGroupState(
|
||||
twoTouchList: groupTwoTouchList, allSwitches: allSwitchesValue));
|
||||
|
||||
List<String> allDeviceIds =
|
||||
groupTwoTouchList.map((device) => device.deviceId).toList();
|
||||
final response = await DevicesAPI.deviceBatchController(
|
||||
code: 'switch_1',
|
||||
devicesUuid: allDeviceIds,
|
||||
devicesUuid: [event.deviceId],
|
||||
value: !event.value,
|
||||
);
|
||||
|
||||
@@ -616,15 +612,13 @@ class TwoTouchBloc extends Bloc<TwoTouchEvent, TwoTouchState> {
|
||||
allSwitchesValue = false;
|
||||
}
|
||||
});
|
||||
List<String> allDeviceIds =
|
||||
groupTwoTouchList.map((device) => device.deviceId).toList();
|
||||
|
||||
emit(UpdateGroupState(
|
||||
twoTouchList: groupTwoTouchList, allSwitches: allSwitchesValue));
|
||||
|
||||
final response = await DevicesAPI.deviceBatchController(
|
||||
code: 'switch_2',
|
||||
devicesUuid: allDeviceIds,
|
||||
devicesUuid: [event.deviceId],
|
||||
value: !event.value,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user