kinda fixed pizza event page maybe

This commit is contained in:
broodjeaap89 2021-09-25 18:35:38 +02:00
parent 46b4f38928
commit 40210e1b33
2 changed files with 13 additions and 11 deletions

View file

@ -46,8 +46,10 @@ class PizzaEventPageState extends State<PizzaEventPage> {
flex: 15, flex: 15,
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
Text(widget.pizzaEvent.name), Text(
Text(getTimeRemainingString(widget.pizzaEvent.dateTime)), getTimeRemainingString(widget.pizzaEvent.dateTime),
style: Theme.of(context).textTheme.subtitle1
),
Container( Container(
color: Theme.of(context).buttonColor, color: Theme.of(context).buttonColor,
child: TextButton( child: TextButton(
@ -75,11 +77,11 @@ class PizzaEventPageState extends State<PizzaEventPage> {
3: FlexColumnWidth(), 3: FlexColumnWidth(),
}, },
children: <TableRow>[ children: <TableRow>[
const TableRow( TableRow(
children: <TableCell>[ children: <TableCell>[
TableCell(child: Text("Ingredient")), TableCell(child: Text("Ingredient", style: Theme.of(context).textTheme.bodyText1)),
TableCell(child: Text("Total")), TableCell(child: Text("Total", style: Theme.of(context).textTheme.bodyText1)),
TableCell(child: Center(child: Text("Bought"))) TableCell(child: Center(child: Text("Bought", style: Theme.of(context).textTheme.bodyText1)))
] ]
) )
] + widget.pizzaEvent.recipe.ingredients.map((ingredient) => buildIngredientWidget(ingredient)).toList(), ] + widget.pizzaEvent.recipe.ingredients.map((ingredient) => buildIngredientWidget(ingredient)).toList(),
@ -93,9 +95,9 @@ class PizzaEventPageState extends State<PizzaEventPage> {
children: <TableRow>[ children: <TableRow>[
TableRow( TableRow(
children: <TableCell>[ children: <TableCell>[
const TableCell(child: Text("Recipe Step")), TableCell(child: Text("Recipe Step", style: Theme.of(context).textTheme.bodyText1)),
const TableCell(child: Text("When")), TableCell(child: Text("When", style: Theme.of(context).textTheme.bodyText1)),
TableCell(child: Text("$completedRecipeStepCount/$recipeStepCount")), TableCell(child: Text("$completedRecipeStepCount/$recipeStepCount", style: Theme.of(context).textTheme.bodyText1)),
] ]
) )
] + widget.pizzaEvent.recipe.recipeSteps.map((recipeStep) => buildRecipeStepWhenWidget(recipeStep)).toList() ] + widget.pizzaEvent.recipe.recipeSteps.map((recipeStep) => buildRecipeStepWhenWidget(recipeStep)).toList()
@ -133,6 +135,7 @@ class PizzaEventPageState extends State<PizzaEventPage> {
TableCell(child: Text(ingredient.name)), TableCell(child: Text(ingredient.name)),
TableCell(child: Text("${ingredient.getAbsoluteString(totalWeight)}${ingredient.unit}")), TableCell(child: Text("${ingredient.getAbsoluteString(totalWeight)}${ingredient.unit}")),
TableCell(child: Center(child: Checkbox( TableCell(child: Center(child: Checkbox(
activeColor: Theme.of(context).primaryColor,
value: ingredient.bought, value: ingredient.bought,
onChanged: (bool? newValue) { onChanged: (bool? newValue) {
setState((){ingredient.bought = newValue!;}); setState((){ingredient.bought = newValue!;});

View file

@ -8,6 +8,5 @@
- push to instagram ? - push to instagram ?
## Refactor ## Refactor
- create a theme for the app
- prettify view event page
## Bug ## Bug