push ac temp step amount and main door icons

This commit is contained in:
ashrafzarkanisala
2024-09-23 07:29:04 +03:00
parent 2955533209
commit b5eeeedcd2
6 changed files with 81 additions and 18 deletions

View File

@ -118,7 +118,7 @@ class _CurrentTempState extends State<BatchCurrentTemp> {
onIncrement: () {
if (_adjustedValue < 30) {
setState(() {
_adjustedValue++;
_adjustedValue = _adjustedValue + 0.5;
});
_onValueChanged(_adjustedValue);
}
@ -126,7 +126,7 @@ class _CurrentTempState extends State<BatchCurrentTemp> {
onDecrement: () {
if (_adjustedValue > 20) {
setState(() {
_adjustedValue--;
_adjustedValue = _adjustedValue - 0.5;
});
_onValueChanged(_adjustedValue);
}

View File

@ -118,7 +118,7 @@ class _CurrentTempState extends State<CurrentTemp> {
onIncrement: () {
if (_adjustedValue < 30) {
setState(() {
_adjustedValue++;
_adjustedValue = _adjustedValue + 0.5;
});
_onValueChanged(_adjustedValue);
}
@ -126,7 +126,7 @@ class _CurrentTempState extends State<CurrentTemp> {
onDecrement: () {
if (_adjustedValue > 20) {
setState(() {
_adjustedValue--;
_adjustedValue = _adjustedValue - 0.5;
});
_onValueChanged(_adjustedValue);
}

View File

@ -75,16 +75,18 @@ class MainDoorSensorControlView extends StatelessWidget
),
children: [
IconNameStatusContainer(
isFullIcon: true,
name: status.doorContactState ? 'Open' : 'Close',
icon: Assets.mainDoor,
icon: Assets.openCloseDoor,
onTap: () {},
status: status.doorContactState,
textColor: ColorsManager.red,
paddingAmount: 8,
),
IconNameStatusContainer(
isFullIcon: true,
name: 'Open/Close\nRecord',
icon: Assets.mainDoorReports,
icon: Assets.openCloseRecords,
onTap: () {
final from = DateTime.now()
.subtract(const Duration(days: 30))
@ -103,6 +105,7 @@ class MainDoorSensorControlView extends StatelessWidget
textColor: ColorsManager.blackColor,
),
IconNameStatusContainer(
isFullIcon: false,
name: 'Notifications\nSettings',
icon: Assets.mainDoorNotifi,
onTap: () {
@ -113,6 +116,7 @@ class MainDoorSensorControlView extends StatelessWidget
},
status: false,
textColor: ColorsManager.blackColor,
paddingAmount: 14,
),
],
);
@ -128,6 +132,7 @@ class IconNameStatusContainer extends StatelessWidget {
required this.status,
required this.textColor,
this.paddingAmount = 12,
required this.isFullIcon,
});
final String name;
@ -136,6 +141,7 @@ class IconNameStatusContainer extends StatelessWidget {
final bool status;
final Color textColor;
final double? paddingAmount;
final bool isFullIcon;
@override
Widget build(BuildContext context) {
@ -145,22 +151,30 @@ class IconNameStatusContainer extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 60,
height: 60,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: ColorsManager.whiteColors,
),
margin: const EdgeInsets.symmetric(horizontal: 4),
padding: EdgeInsets.all(paddingAmount ?? 12),
child: ClipOval(
if (isFullIcon)
ClipOval(
child: SvgPicture.asset(
icon,
fit: BoxFit.fill,
fit: BoxFit.contain,
),
)
else
Container(
width: 60,
height: 60,
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: ColorsManager.whiteColors,
),
//margin: const EdgeInsets.symmetric(horizontal: 4),
padding: EdgeInsets.all(paddingAmount ?? 12),
child: ClipOval(
child: SvgPicture.asset(
icon,
fit: BoxFit.contain,
),
),
),
),
const Spacer(),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 6),