ingredients widget is now a Table
This commit is contained in:
parent
a5df4a0d8a
commit
e4a7a8d03e
1 changed files with 15 additions and 13 deletions
|
@ -9,24 +9,26 @@ class Ingredients {
|
||||||
|
|
||||||
Table getIngredientsTable(int pizzaCount, int doughBallSize) {
|
Table getIngredientsTable(int pizzaCount, int doughBallSize) {
|
||||||
return Table(
|
return Table(
|
||||||
border: TableBorder.all(),
|
border: TableBorder.all(),
|
||||||
columnWidths: const <int, TableColumnWidth>{
|
columnWidths: const <int, TableColumnWidth>{
|
||||||
0: FlexColumnWidth(2),
|
0: FlexColumnWidth(2),
|
||||||
1: FlexColumnWidth(2),
|
1: FlexColumnWidth(2),
|
||||||
2: FlexColumnWidth(2),
|
2: FlexColumnWidth(2),
|
||||||
},
|
},
|
||||||
children:
|
children:
|
||||||
<TableRow>[
|
<TableRow>[
|
||||||
TableRow(
|
TableRow(
|
||||||
children: <TableCell>[
|
children: <TableCell>[
|
||||||
TableCell(child: Center(child: Text("Ingredient"))),
|
TableCell(child: Center(child: Text("Ingredient"))),
|
||||||
TableCell(child: Center(child: Text("Single Ball"))),
|
TableCell(child: Center(child: Text("Single Ball"))),
|
||||||
TableCell(child: Center(child: Text("Total"))),
|
TableCell(child: Center(child: Text("Total"))),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
] +
|
] +
|
||||||
ingredients.values.map((ingredient) => ingredient.getIngredientTableRow(pizzaCount, doughBallSize)).toList()
|
ingredients.values.map((ingredient) =>
|
||||||
|
ingredient.getIngredientTableRow(pizzaCount, doughBallSize))
|
||||||
|
.toList()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue