Merge pull request #39 from SyncrowIOT/bug_fixes_sprint_10

Bug fixes sprint 10
This commit is contained in:
Abdullah
2024-10-09 20:35:05 +03:00
committed by GitHub
2 changed files with 81 additions and 60 deletions

View File

@ -23,7 +23,7 @@ class _NotificationDialogState extends State<NotificationDialog> {
borderRadius: BorderRadius.circular(20),
),
child: SizedBox(
width: 798,
width: 660,
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20.0),
@ -70,8 +70,11 @@ class _NotificationDialogState extends State<NotificationDialog> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
ToggleWidget(
value: true,
SizedBox(
width: 170,
height: 135,
child: ToggleWidget(
value: isLowBatteryNotificationEnabled,
code: 'notification',
deviceId: '',
label: 'Low Battery',
@ -82,8 +85,12 @@ class _NotificationDialogState extends State<NotificationDialog> {
},
icon: '-1',
),
ToggleWidget(
value: true,
),
SizedBox(
width: 170,
height: 135,
child: ToggleWidget(
value: isClosingRemindersEnabled,
code: 'notification',
deviceId: '',
label: 'Closing\nReminders',
@ -94,8 +101,12 @@ class _NotificationDialogState extends State<NotificationDialog> {
},
icon: '-1',
),
ToggleWidget(
value: true,
),
SizedBox(
width: 170,
height: 135,
child: ToggleWidget(
value: isDoorAlarmEnabled,
code: 'notification',
deviceId: '',
label: 'Door Alarm',
@ -106,6 +117,7 @@ class _NotificationDialogState extends State<NotificationDialog> {
},
icon: '-1',
),
),
],
),
],

View File

@ -6,12 +6,13 @@ class WaterLeakNotificationDialog extends StatefulWidget {
const WaterLeakNotificationDialog({super.key});
@override
State<WaterLeakNotificationDialog> createState() => _WaterLeakNotificationDialogState();
State<WaterLeakNotificationDialog> createState() => _NotificationDialogState();
}
class _WaterLeakNotificationDialogState extends State<WaterLeakNotificationDialog> {
class _NotificationDialogState extends State<WaterLeakNotificationDialog> {
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<WaterLeakNotificationDialo
borderRadius: BorderRadius.circular(20),
),
child: SizedBox(
width: 400,
width: 560,
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20.0),
@ -69,8 +70,11 @@ class _WaterLeakNotificationDialogState extends State<WaterLeakNotificationDialo
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
ToggleWidget(
value: true,
SizedBox(
width: 170,
height: 135,
child: ToggleWidget(
value: isLowBatteryNotificationEnabled,
code: 'notification',
deviceId: '',
label: 'Low Battery',
@ -81,18 +85,23 @@ class _WaterLeakNotificationDialogState extends State<WaterLeakNotificationDialo
},
icon: '-1',
),
ToggleWidget(
value: true,
),
SizedBox(
width: 170,
height: 135,
child: ToggleWidget(
value: isWaterLeakage,
code: 'notification',
deviceId: '',
label: 'Water Leakage',
onChange: (v) {
setState(() {
isWaterLeakageNotificationEnabled = v;
isWaterLeakage = v;
});
},
icon: '-1',
),
),
],
),
],