From e4a7a8d03e778143e11839d232cf4dabb135c98c Mon Sep 17 00:00:00 2001 From: broodjeaap89 Date: Sun, 11 Jul 2021 14:26:27 +0200 Subject: [PATCH] ingredients widget is now a Table --- lib/entities/PizzaRecipe/Ingredients.dart | 28 ++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/entities/PizzaRecipe/Ingredients.dart b/lib/entities/PizzaRecipe/Ingredients.dart index 979d5e8..7578baa 100644 --- a/lib/entities/PizzaRecipe/Ingredients.dart +++ b/lib/entities/PizzaRecipe/Ingredients.dart @@ -9,24 +9,26 @@ class Ingredients { Table getIngredientsTable(int pizzaCount, int doughBallSize) { return Table( - border: TableBorder.all(), - columnWidths: const { - 0: FlexColumnWidth(2), - 1: FlexColumnWidth(2), - 2: FlexColumnWidth(2), - }, - children: + border: TableBorder.all(), + columnWidths: const { + 0: FlexColumnWidth(2), + 1: FlexColumnWidth(2), + 2: FlexColumnWidth(2), + }, + children: [ TableRow( - children: [ - TableCell(child: Center(child: Text("Ingredient"))), - TableCell(child: Center(child: Text("Single Ball"))), - TableCell(child: Center(child: Text("Total"))), - ] + children: [ + 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() ); } } \ No newline at end of file