fix: RenderOverFlex in Dashboard UI

This commit is contained in:
ARYPROGRAMMER
2024-10-23 23:36:50 +05:30
parent 5f148e7c92
commit bdb97cfae8
2 changed files with 58 additions and 52 deletions

3
devtools_options.yaml Normal file
View File

@@ -0,0 +1,3 @@
description: This file stores settings for Dart & Flutter DevTools.
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
extensions:

View File

@@ -22,60 +22,63 @@ class CategoriesCard extends StatelessWidget {
return Card(
elevation: elevation,
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 5),
child: Text(
currentCategory.name,
style: Theme.of(context).textTheme.titleLarge,
),
),
Container(
padding: const EdgeInsets.all(10),
height: 220,
child: MeasurementChartWidgetFl(
entriesAll,
currentCategory.unit,
avgs: entries7dAvg,
),
),
if (entries7dAvg.isNotEmpty)
MeasurementOverallChangeWidget(
entries7dAvg.first,
entries7dAvg.last,
currentCategory.unit,
),
const Divider(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextButton(
child: Text(AppLocalizations.of(context).goToDetailPage),
onPressed: () {
Navigator.pushNamed(
context,
MeasurementEntriesScreen.routeName,
arguments: currentCategory.id,
);
},
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(top: 5),
child: Text(
currentCategory.name,
style: Theme.of(context).textTheme.titleLarge,
),
IconButton(
onPressed: () async {
await Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).newEntry,
MeasurementEntryForm(currentCategory.id!),
),
);
},
icon: const Icon(Icons.add),
),
Container(
padding: const EdgeInsets.all(10),
height: 220,
child: MeasurementChartWidgetFl(
entriesAll,
currentCategory.unit,
avgs: entries7dAvg,
),
],
),
],
),
if (entries7dAvg.isNotEmpty)
MeasurementOverallChangeWidget(
entries7dAvg.first,
entries7dAvg.last,
currentCategory.unit,
),
const Divider(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextButton(
child: Text(AppLocalizations.of(context).goToDetailPage),
onPressed: () {
Navigator.pushNamed(
context,
MeasurementEntriesScreen.routeName,
arguments: currentCategory.id,
);
},
),
IconButton(
onPressed: () async {
await Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).newEntry,
MeasurementEntryForm(currentCategory.id!),
),
);
},
icon: const Icon(Icons.add),
),
],
),
],
),
),
);
}