fixed a null error when the user backs out of the confirm new pizza event dialog

This commit is contained in:
broodjeaap89 2021-07-13 19:29:42 +02:00
parent 86b6004fd7
commit 0fb0c97a44

View file

@ -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,