safer code

This commit is contained in:
Felix 2019-08-12 10:42:17 +01:00
parent 2218422df4
commit 9cba3e037c
2 changed files with 7 additions and 3 deletions

View file

@ -150,8 +150,11 @@ class ReceiptPage2State extends State<ReceiptPage2> {
var organisations = new FindOrganisations();
var orgDialog = organisations.dialog(context);
orgDialog.then((organisation) {
setState(() => {});
debugPrint(organisation.name);
try {
debugPrint(organisation.name);
} catch(_) {
debugPrint("No organisation chosen.");
}
});
},
child: Text(