Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: RenderOverFlex Error on DashBoard Screen For Measurement Graphs #663

Merged
merged 7 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
- Dieter Plaetinck - <https://github.com/Dieterbe>
- Dennis van Peer - <https://github.com/Denpeer>
- sizzlesloth - <https://github.com/sizzlesloth>
- Arya Singh - <https://github.com/ARYPROGRAMMER>
- Xianglin Zeng - <https://github.com/FutureYL3>

## Translators
Expand Down
105 changes: 54 additions & 51 deletions lib/widgets/measurements/categories_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
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,
),
),
const Divider(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextButton(
child: Text(AppLocalizations.of(context).goToDetailPage),
onPressed: () {
Navigator.pushNamed(
context,
MeasurementEntriesScreen.routeName,
arguments: currentCategory.id,
);
},
Container(
padding: const EdgeInsets.all(10),
height: 220,
child: MeasurementChartWidgetFl(
entriesAll,
currentCategory.unit,
avgs: entries7dAvg,
),
IconButton(
onPressed: () async {
await Navigator.pushNamed(
context,
FormScreen.routeName,
arguments: FormScreenArguments(
AppLocalizations.of(context).newEntry,
MeasurementEntryForm(currentCategory.id!),
),
);
},
icon: const Icon(Icons.add),
),
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),
),
],
),
],
),
),
);
}
Expand Down
Loading