Change some paddings

This commit is contained in:
Marco 2024-06-10 03:31:06 +02:00
parent 7a6062fd95
commit 0080e39605
2 changed files with 55 additions and 46 deletions

View File

@ -26,15 +26,23 @@ class PerDateWidget extends StatelessWidget {
itemCount: state.foodEntries.length + 2,
itemBuilder: (BuildContext itemBuilderContext, int index) {
if (index == state.foodEntries.length) {
return SumWidget(limit: state.kcalLimit);
return Padding(
padding: const EdgeInsets.symmetric(vertical: 15),
child: SumWidget(limit: state.kcalLimit),
);
}
if (index == state.foodEntries.length + 1) {
return EnterFoodWidget(
return Column(
children: [
EnterFoodWidget(
onAdd: (context, entry) {
context
.read<FoodEntryBloc>()
.add(FoodEntryEvent(entry: entry, date: date));
},
),
const SizedBox(height: 75),
],
);
}

View File

@ -18,45 +18,46 @@ class RowWidgetWithSpacers extends StatefulWidget {
class _RowWidgetWithSpacersState extends State<RowWidgetWithSpacers> {
@override
Widget build(BuildContext context) {
return Row(
return Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expanded(
flex: 5,
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0),
padding: const EdgeInsets.only(
left: 8.0,
right: 2.0,
),
child: widget.widget1 ?? Container(),
)),
Expanded(
flex: 5,
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0),
padding: const EdgeInsets.symmetric(horizontal: 2.0),
child: widget.widget2 ?? Container(),
)),
Expanded(
flex: 5,
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0),
padding: const EdgeInsets.symmetric(horizontal: 2.0),
child: widget.widget3 ?? Container(),
)),
Expanded(
flex: 5,
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0),
padding: const EdgeInsets.symmetric(horizontal: 2.0),
child: widget.widget4 ?? Container(),
)),
Expanded(
flex: 5,
flex: 2,
child: Padding(
padding:
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0),
padding: const EdgeInsets.symmetric(horizontal: 2.0),
child: widget.widget5 ?? Container(),
)),
],
),
);
}
}