bugs fixes

This commit is contained in:
mohammad
2024-10-10 10:00:48 +03:00
parent 82f08ddcd8
commit 40ee207623
8 changed files with 55 additions and 62 deletions
@@ -138,9 +138,10 @@ class GarageDoorScreen extends StatelessWidget {
Assets
.garageSchedule),
),
const SizedBox(
const Flexible(
child: SizedBox(
height: 15,
),
)),
const Flexible(
child: FittedBox(
child: BodySmall(
@@ -187,9 +188,10 @@ class GarageDoorScreen extends StatelessWidget {
Assets
.garageCountdown),
),
const SizedBox(
const Flexible(
child: SizedBox(
height: 15,
),
)),
const Flexible(
child: FittedBox(
child: BodySmall(
@@ -238,9 +240,10 @@ class GarageDoorScreen extends StatelessWidget {
Assets
.doorRecordsIcon),
),
const SizedBox(
const Flexible(
child: SizedBox(
height: 15,
),
)),
const Flexible(
child: FittedBox(
child: BodySmall(
@@ -282,9 +285,10 @@ class GarageDoorScreen extends StatelessWidget {
child: SvgPicture.asset(Assets
.garagePreferencesIcon),
),
const SizedBox(
const Flexible(
child: SizedBox(
height: 15,
),
)),
const Flexible(
child: FittedBox(
child: BodySmall(
@@ -97,9 +97,12 @@ class PreferencesPage extends StatelessWidget {
Transform.scale(
scale: .8,
child: CupertinoSwitch(
value: garageDoorBloc.deviceStatus.doorState1 != 'unclosed_time',
value: garageDoorBloc.deviceStatus
.doorState1 !=
'unclosed_time',
onChanged: (value) {
context.read<GarageDoorBloc>()
context
.read<GarageDoorBloc>()
.add(
ToggleAlarmEvent(
value
@@ -156,36 +159,37 @@ class PreferencesPage extends StatelessWidget {
},
);
},
child: SizedBox(
child: ListTile(
contentPadding: EdgeInsets.zero,
leading: const BodyMedium(
child: Container(
padding: EdgeInsets.only(top: 12, bottom: 12),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
const BodyMedium(
text: 'Opening and Closing Time',
fontWeight: FontWeight.normal,
),
trailing: Container(
height: 90,
width: 120,
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
BodyMedium(
fontColor: ColorsManager.textGray,
text:
'${garageDoorBloc.secondSelected.toString()} Seconds',
fontWeight: FontWeight.normal,
),
const Icon(
Icons.arrow_forward_ios,
size: 15,
color: ColorsManager.textGray,
)
],
),
)),
Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
children: [
BodyMedium(
fontColor: ColorsManager.textGray,
text:
'${garageDoorBloc.secondSelected.toString()} Seconds',
fontWeight: FontWeight.normal,
fontSize: 13,
),
const Icon(
Icons.arrow_forward_ios,
size: 15,
color: ColorsManager.textGray,
)
],
),
],
),
),
),
)
@@ -22,7 +22,7 @@ class WaterLeakRecordsScreen extends StatefulWidget {
}
class _WaterLeakRecordsScreenState extends State<WaterLeakRecordsScreen> {
int _selectedIndex = 0;
int _selectedIndex = 0;
@override
Widget build(BuildContext context) {
return DefaultScaffold(
@@ -177,8 +177,8 @@ class _WaterLeakRecordsScreenState extends State<WaterLeakRecordsScreen> {
),
title: Text(
record.value == 'true'
? "Normal"
: "Leak Detected",
? "Leak Detected"
: "Normal",
style: const TextStyle(
fontWeight:
FontWeight.bold,
@@ -207,6 +207,8 @@ class _WaterLeakRecordsScreenState extends State<WaterLeakRecordsScreen> {
Container(
height: 10,
width: 20,
child:
const Center(child: Text('No data available.')),
),
],
),