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), borderRadius: BorderRadius.circular(20),
), ),
child: SizedBox( child: SizedBox(
width: 798, width: 660,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Padding( child: Padding(
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0),
@ -70,41 +70,53 @@ class _NotificationDialogState extends State<NotificationDialog> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ children: [
ToggleWidget( SizedBox(
value: true, width: 170,
code: 'notification', height: 135,
deviceId: '', child: ToggleWidget(
label: 'Low Battery', value: isLowBatteryNotificationEnabled,
onChange: (v) { code: 'notification',
setState(() { deviceId: '',
isLowBatteryNotificationEnabled = v; label: 'Low Battery',
}); onChange: (v) {
}, setState(() {
icon: '-1', isLowBatteryNotificationEnabled = v;
});
},
icon: '-1',
),
), ),
ToggleWidget( SizedBox(
value: true, width: 170,
code: 'notification', height: 135,
deviceId: '', child: ToggleWidget(
label: 'Closing\nReminders', value: isClosingRemindersEnabled,
onChange: (v) { code: 'notification',
setState(() { deviceId: '',
isClosingRemindersEnabled = v; label: 'Closing\nReminders',
}); onChange: (v) {
}, setState(() {
icon: '-1', isClosingRemindersEnabled = v;
});
},
icon: '-1',
),
), ),
ToggleWidget( SizedBox(
value: true, width: 170,
code: 'notification', height: 135,
deviceId: '', child: ToggleWidget(
label: 'Door Alarm', value: isDoorAlarmEnabled,
onChange: (v) { code: 'notification',
setState(() { deviceId: '',
isDoorAlarmEnabled = v; label: 'Door Alarm',
}); onChange: (v) {
}, setState(() {
icon: '-1', isDoorAlarmEnabled = v;
});
},
icon: '-1',
),
), ),
], ],
), ),

View File

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