added 'wait options' to addPizzaEventPage
This commit is contained in:
parent
d4dcd2479d
commit
8420188d9c
2 changed files with 30 additions and 1 deletions
|
@ -6,8 +6,11 @@ class RecipeStep {
|
||||||
final String waitUnit;
|
final String waitUnit;
|
||||||
final int waitMin;
|
final int waitMin;
|
||||||
final int waitMax;
|
final int waitMax;
|
||||||
|
late int waitValue;
|
||||||
final String description;
|
final String description;
|
||||||
final List<RecipeSubStep> subSteps;
|
final List<RecipeSubStep> subSteps;
|
||||||
|
|
||||||
RecipeStep(this.name, this.waitDescription, this.description, this.waitUnit, this.waitMin, this.waitMax, this.subSteps);
|
RecipeStep(this.name, this.description, this.waitDescription, this.waitUnit, this.waitMin, this.waitMax, this.subSteps) {
|
||||||
|
waitValue = waitMin;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -156,6 +156,32 @@ class AddPizzaEventPageState extends State<AddPizzaEventPage> {
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
Divider(),
|
Divider(),
|
||||||
|
this.initialized ? Column(
|
||||||
|
children: this.pizzaRecipe.recipeSteps.where((recipeStep) => recipeStep.waitDescription.length > 0).map((recipeStep) {
|
||||||
|
return <Widget>[
|
||||||
|
Text(recipeStep.waitDescription),
|
||||||
|
Row(
|
||||||
|
children: <Widget>[
|
||||||
|
Expanded(
|
||||||
|
child: Slider(
|
||||||
|
value: recipeStep.waitValue.toDouble(),
|
||||||
|
min: recipeStep.waitMin.toDouble(),
|
||||||
|
max: recipeStep.waitMax.toDouble(),
|
||||||
|
divisions: recipeStep.waitMax - recipeStep.waitMin,
|
||||||
|
label: recipeStep.waitValue.toString(),
|
||||||
|
onChanged: (newValue) => setState(() => recipeStep.waitValue = newValue.toInt()),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
width: 25,
|
||||||
|
child: Text(recipeStep.waitValue.toString())
|
||||||
|
)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
];
|
||||||
|
}).expand((option) => option).toList()
|
||||||
|
) : Container(),
|
||||||
|
Divider(),
|
||||||
this.initialized ? this.pizzaRecipe.getIngredientsTable(this.pizzaCount, this.doughBallSize) : Container(),
|
this.initialized ? this.pizzaRecipe.getIngredientsTable(this.pizzaCount, this.doughBallSize) : Container(),
|
||||||
Divider(),
|
Divider(),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue