Enhanced responsiveness of AqiLocationInfoCell.

This commit is contained in:
Faris Armoush
2025-05-29 09:24:29 +03:00
parent cc5f107ccb
commit a75e6a89a9
3 changed files with 31 additions and 26 deletions

View File

@ -50,7 +50,7 @@ class AirQualityView extends StatelessWidget {
],
),
),
Expanded(flex: 5, child: AirQualityEndSideWidget()),
Expanded(flex: 6, child: AirQualityEndSideWidget()),
],
),
),

View File

@ -115,7 +115,7 @@ class AirQualityEndSideWidget extends StatelessWidget {
children: [
AqiLocationInfoCell(
label: 'Temperature',
value: '25°',
value: ' 25°',
svgPath: Assets.aqiTemperature,
),
AqiLocationInfoCell(
@ -125,7 +125,7 @@ class AirQualityEndSideWidget extends StatelessWidget {
),
AqiLocationInfoCell(
label: 'Air Quality',
value: '120',
value: ' 120',
svgPath: Assets.aqiAirQuality,
),
],

View File

@ -27,17 +27,20 @@ class AqiLocationInfoCell extends StatelessWidget {
children: [
Align(
alignment: AlignmentDirectional.topStart,
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: AlignmentDirectional.topStart,
child: Padding(
padding: const EdgeInsetsDirectional.all(10),
child: Text(
label,
style: context.textTheme.bodySmall?.copyWith(
color: ColorsManager.textPrimaryColor,
fontWeight: FontWeight.w400,
fontSize: 12,
child: Padding(
padding: const EdgeInsetsDirectional.all(10),
child: SizedBox(
height: 24,
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: AlignmentDirectional.topStart,
child: Text(
label,
style: context.textTheme.bodySmall?.copyWith(
color: ColorsManager.textPrimaryColor,
fontWeight: FontWeight.w400,
fontSize: 12,
),
),
),
),
@ -46,18 +49,20 @@ class AqiLocationInfoCell extends StatelessWidget {
Align(
alignment: AlignmentDirectional.bottomEnd,
child: Padding(
padding: const EdgeInsetsDirectional.all(10).add(
const EdgeInsetsDirectional.only(start: 32),
),
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: AlignmentDirectional.bottomEnd,
child: Text(
value,
style: context.textTheme.bodySmall?.copyWith(
color: ColorsManager.vividBlue.withValues(alpha: 0.7),
fontWeight: FontWeight.w700,
fontSize: 24,
padding: const EdgeInsetsDirectional.all(10),
child: SizedBox(
height: 40,
width: 120,
child: FittedBox(
fit: BoxFit.scaleDown,
alignment: AlignmentDirectional.bottomEnd,
child: Text(
value,
style: context.textTheme.bodySmall?.copyWith(
color: ColorsManager.vividBlue.withValues(alpha: 0.7),
fontWeight: FontWeight.w700,
fontSize: 24,
),
),
),
),