Simplify widget structure in TotalEnergyConsumptionChart by removing unnecessary FittedBox wrapper around month title text.

This commit is contained in:
Faris Armoush
2025-04-30 16:07:37 +03:00
parent c9aaf2580f
commit d6ef06c1b3

View File

@ -106,15 +106,12 @@ class TotalEnergyConsumptionChart extends StatelessWidget {
maxIncluded: true, maxIncluded: true,
getTitlesWidget: (value, meta) => Padding( getTitlesWidget: (value, meta) => Padding(
padding: const EdgeInsets.only(top: 20.0), padding: const EdgeInsets.only(top: 20.0),
child: FittedBox( child: Text(
fit: BoxFit.scaleDown, chartData.elementAtOrNull(value.toInt())?.date.month.getMonthName ??
child: Text( '',
chartData.elementAtOrNull(value.toInt())?.date.month.getMonthName ?? style: context.textTheme.bodySmall?.copyWith(
'', fontSize: 12,
style: context.textTheme.bodySmall?.copyWith( color: ColorsManager.greyColor,
fontSize: 12,
color: ColorsManager.greyColor,
),
), ),
), ),
), ),