ingredients widget is now a Table

This commit is contained in:
broodjeaap89 2021-07-11 14:26:27 +02:00
parent a5df4a0d8a
commit e4a7a8d03e

View file

@ -9,24 +9,26 @@ class Ingredients {
Table getIngredientsTable(int pizzaCount, int doughBallSize) {
return Table(
border: TableBorder.all(),
columnWidths: const <int, TableColumnWidth>{
0: FlexColumnWidth(2),
1: FlexColumnWidth(2),
2: FlexColumnWidth(2),
},
children:
border: TableBorder.all(),
columnWidths: const <int, TableColumnWidth>{
0: FlexColumnWidth(2),
1: FlexColumnWidth(2),
2: FlexColumnWidth(2),
},
children:
<TableRow>[
TableRow(
children: <TableCell>[
TableCell(child: Center(child: Text("Ingredient"))),
TableCell(child: Center(child: Text("Single Ball"))),
TableCell(child: Center(child: Text("Total"))),
]
children: <TableCell>[
TableCell(child: Center(child: Text("Ingredient"))),
TableCell(child: Center(child: Text("Single Ball"))),
TableCell(child: Center(child: Text("Total"))),
]
)
] +
ingredients.values.map((ingredient) => ingredient.getIngredientTableRow(pizzaCount, doughBallSize)).toList()
ingredients.values.map((ingredient) =>
ingredient.getIngredientTableRow(pizzaCount, doughBallSize))
.toList()
);
}
}