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

View File

@ -27,11 +27,13 @@ class AqiLocationInfoCell extends StatelessWidget {
children: [ children: [
Align( Align(
alignment: AlignmentDirectional.topStart, alignment: AlignmentDirectional.topStart,
child: Padding(
padding: const EdgeInsetsDirectional.all(10),
child: SizedBox(
height: 24,
child: FittedBox( child: FittedBox(
fit: BoxFit.scaleDown, fit: BoxFit.scaleDown,
alignment: AlignmentDirectional.topStart, alignment: AlignmentDirectional.topStart,
child: Padding(
padding: const EdgeInsetsDirectional.all(10),
child: Text( child: Text(
label, label,
style: context.textTheme.bodySmall?.copyWith( style: context.textTheme.bodySmall?.copyWith(
@ -43,12 +45,14 @@ class AqiLocationInfoCell extends StatelessWidget {
), ),
), ),
), ),
),
Align( Align(
alignment: AlignmentDirectional.bottomEnd, alignment: AlignmentDirectional.bottomEnd,
child: Padding( child: Padding(
padding: const EdgeInsetsDirectional.all(10).add( padding: const EdgeInsetsDirectional.all(10),
const EdgeInsetsDirectional.only(start: 32), child: SizedBox(
), height: 40,
width: 120,
child: FittedBox( child: FittedBox(
fit: BoxFit.scaleDown, fit: BoxFit.scaleDown,
alignment: AlignmentDirectional.bottomEnd, alignment: AlignmentDirectional.bottomEnd,
@ -63,6 +67,7 @@ class AqiLocationInfoCell extends StatelessWidget {
), ),
), ),
), ),
),
Align( Align(
alignment: AlignmentDirectional.bottomStart, alignment: AlignmentDirectional.bottomStart,
child: SizedBox.square( child: SizedBox.square(