fixed a null error when the user backs out of the confirm new pizza event dialog
This commit is contained in:
parent
86b6004fd7
commit
0fb0c97a44
1 changed files with 4 additions and 1 deletions
|
@ -186,12 +186,15 @@ class AddPizzaEventPageState extends State<AddPizzaEventPage> {
|
|||
}
|
||||
setState(() { this.nameValidation = false; });
|
||||
FocusScope.of(context).unfocus();
|
||||
DateTime eventTime = await showDialog(
|
||||
DateTime? eventTime = await showDialog(
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return ConfirmPizzaEventDialog(name: name, pizzaRecipe: pizzaRecipe, pizzaCount: pizzaCount, doughBallSize: doughBallSize);
|
||||
}
|
||||
);
|
||||
if (eventTime == null){
|
||||
return;
|
||||
}
|
||||
Navigator.pop(context, PizzaEvent(
|
||||
this.name,
|
||||
this.pizzaRecipe,
|
||||
|
|
Loading…
Add table
Reference in a new issue