diff --git a/lib/pages/device_managment/main_door_sensor/widgets/notification_dialog.dart b/lib/pages/device_managment/main_door_sensor/widgets/notification_dialog.dart index 83ba41bc..ac66b315 100644 --- a/lib/pages/device_managment/main_door_sensor/widgets/notification_dialog.dart +++ b/lib/pages/device_managment/main_door_sensor/widgets/notification_dialog.dart @@ -23,7 +23,7 @@ class _NotificationDialogState extends State { borderRadius: BorderRadius.circular(20), ), child: SizedBox( - width: 798, + width: 660, child: SingleChildScrollView( child: Padding( padding: const EdgeInsets.all(20.0), @@ -70,41 +70,53 @@ class _NotificationDialogState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - ToggleWidget( - value: true, - code: 'notification', - deviceId: '', - label: 'Low Battery', - onChange: (v) { - setState(() { - isLowBatteryNotificationEnabled = v; - }); - }, - icon: '-1', + SizedBox( + width: 170, + height: 135, + child: ToggleWidget( + value: isLowBatteryNotificationEnabled, + code: 'notification', + deviceId: '', + label: 'Low Battery', + onChange: (v) { + setState(() { + isLowBatteryNotificationEnabled = v; + }); + }, + icon: '-1', + ), ), - ToggleWidget( - value: true, - code: 'notification', - deviceId: '', - label: 'Closing\nReminders', - onChange: (v) { - setState(() { - isClosingRemindersEnabled = v; - }); - }, - icon: '-1', + SizedBox( + width: 170, + height: 135, + child: ToggleWidget( + value: isClosingRemindersEnabled, + code: 'notification', + deviceId: '', + label: 'Closing\nReminders', + onChange: (v) { + setState(() { + isClosingRemindersEnabled = v; + }); + }, + icon: '-1', + ), ), - ToggleWidget( - value: true, - code: 'notification', - deviceId: '', - label: 'Door Alarm', - onChange: (v) { - setState(() { - isDoorAlarmEnabled = v; - }); - }, - icon: '-1', + SizedBox( + width: 170, + height: 135, + child: ToggleWidget( + value: isDoorAlarmEnabled, + code: 'notification', + deviceId: '', + label: 'Door Alarm', + onChange: (v) { + setState(() { + isDoorAlarmEnabled = v; + }); + }, + icon: '-1', + ), ), ], ), diff --git a/lib/pages/device_managment/water_leak/widgets/water_leak_notifi_dialog.dart b/lib/pages/device_managment/water_leak/widgets/water_leak_notifi_dialog.dart index c8aca44e..0e3e325f 100644 --- a/lib/pages/device_managment/water_leak/widgets/water_leak_notifi_dialog.dart +++ b/lib/pages/device_managment/water_leak/widgets/water_leak_notifi_dialog.dart @@ -6,12 +6,13 @@ class WaterLeakNotificationDialog extends StatefulWidget { const WaterLeakNotificationDialog({super.key}); @override - State createState() => _WaterLeakNotificationDialogState(); + State createState() => _NotificationDialogState(); } -class _WaterLeakNotificationDialogState extends State { +class _NotificationDialogState extends State { bool isLowBatteryNotificationEnabled = true; - bool isWaterLeakageNotificationEnabled = true; + bool isClosingRemindersEnabled = true; + bool isWaterLeakage = true; @override Widget build(BuildContext context) { @@ -22,7 +23,7 @@ class _WaterLeakNotificationDialogState extends State