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, itemCount: state.foodEntries.length + 2,
itemBuilder: (BuildContext itemBuilderContext, int index) { itemBuilder: (BuildContext itemBuilderContext, int index) {
if (index == state.foodEntries.length) { 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) { if (index == state.foodEntries.length + 1) {
return EnterFoodWidget( return Column(
onAdd: (context, entry) { children: [
context EnterFoodWidget(
.read<FoodEntryBloc>() onAdd: (context, entry) {
.add(FoodEntryEvent(entry: entry, date: date)); 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> { class _RowWidgetWithSpacersState extends State<RowWidgetWithSpacers> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Row( return Padding(
mainAxisAlignment: MainAxisAlignment.end, padding: const EdgeInsets.symmetric(vertical: 4.0),
children: [ child: Row(
Expanded( mainAxisAlignment: MainAxisAlignment.end,
flex: 5, children: [
child: Padding( Expanded(
padding: flex: 5,
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0), child: Padding(
child: widget.widget1 ?? Container(), padding: const EdgeInsets.only(
)), left: 8.0,
Expanded( right: 2.0,
flex: 5, ),
child: Padding( child: widget.widget1 ?? Container(),
padding: )),
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0), Expanded(
child: widget.widget2 ?? Container(), flex: 5,
)), child: Padding(
Expanded( padding: const EdgeInsets.symmetric(horizontal: 2.0),
flex: 5, child: widget.widget2 ?? Container(),
child: Padding( )),
padding: Expanded(
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0), flex: 5,
child: widget.widget3 ?? Container(), child: Padding(
)), padding: const EdgeInsets.symmetric(horizontal: 2.0),
Expanded( child: widget.widget3 ?? Container(),
flex: 5, )),
child: Padding( Expanded(
padding: flex: 5,
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0), child: Padding(
child: widget.widget4 ?? Container(), padding: const EdgeInsets.symmetric(horizontal: 2.0),
)), child: widget.widget4 ?? Container(),
Expanded( )),
flex: 5, Expanded(
child: Padding( flex: 2,
padding: child: Padding(
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0), padding: const EdgeInsets.symmetric(horizontal: 2.0),
child: widget.widget5 ?? Container(), child: widget.widget5 ?? Container(),
)), )),
], ],
),
); );
} }
} }