Introduce ChartTitle widget for consistent chart headings in EnergyConsumptionPerDeviceChartBox and TotalEnergyConsumptionChartBox

This commit is contained in:
Faris Armoush
2025-05-04 10:57:42 +03:00
parent 9c250986b2
commit e43de3f64c
4 changed files with 23 additions and 18 deletions

View File

@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
class ChartTitle extends StatelessWidget {
const ChartTitle({super.key, required this.title});
final Widget title;
@override
Widget build(BuildContext context) {
return DefaultTextStyle(
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.w700,
),
child: title,
);
}
}