show curtain in devices and implement dialog for if and then

last integrate with backend
This commit is contained in:
raf-dev1
2025-06-17 13:34:23 +03:00
parent 994e9f4e57
commit 056a1daadc
10 changed files with 499 additions and 149 deletions

View File

@ -4,6 +4,7 @@ import 'package:syncrow_web/pages/routines/bloc/routine_bloc/routine_bloc.dart';
import 'package:syncrow_web/pages/routines/models/device_functions.dart';
import 'package:syncrow_web/pages/routines/widgets/routine_dialogs/ac_dialog.dart';
import 'package:syncrow_web/pages/routines/widgets/routine_dialogs/ceiling_sensor/ceiling_sensor_helper.dart';
import 'package:syncrow_web/pages/routines/widgets/routine_dialogs/curtain_dialog.dart';
import 'package:syncrow_web/pages/routines/widgets/routine_dialogs/flush_presence_sensor/flush_presence_sensor.dart';
import 'package:syncrow_web/pages/routines/widgets/routine_dialogs/gateway/gateway_helper.dart';
import 'package:syncrow_web/pages/routines/widgets/routine_dialogs/one_gang_switch_dialog.dart';
@ -26,7 +27,7 @@ class DeviceDialogHelper {
final result = await _getDialogForDeviceType(
dialogType: dialogType,
context: context,
productType: data['productType'],
productType: data['productType'] as String,
data: data,
functions: functions,
removeComparetors: removeComparetors,
@ -65,7 +66,14 @@ class DeviceDialogHelper {
removeComparetors: removeComparetors,
dialogType: dialogType,
);
case 'CUR':
return CurtainHelper.showControlDialog(
dialogType: dialogType,
context: context,
functions: functions,
uniqueCustomId: data['uniqueCustomId'],
device: data['device'],
);
case '1G':
return OneGangSwitchHelper.showSwitchFunctionsDialog(
dialogType: dialogType,