diff --git a/lib/common/widgets/organisations_dialog.dart b/lib/common/widgets/organisations_dialog.dart index 2134fb7..9c265c3 100644 --- a/lib/common/widgets/organisations_dialog.dart +++ b/lib/common/widgets/organisations_dialog.dart @@ -23,7 +23,8 @@ class FindOrganisations { TextEditingController searchBarText = new TextEditingController(); var organisations = new Organisations(); var listTitle = "All Organisations"; - var organisationsList = organisations.getTestData(); +// var organisationsList = organisations.getTestData(); + var organisationsList = List(); Future _submitSearch(String search) async { _searchEnabled = false; diff --git a/lib/pages/receipt_page_2.dart b/lib/pages/receipt_page_2.dart index 7f45d6e..2bee870 100644 --- a/lib/pages/receipt_page_2.dart +++ b/lib/pages/receipt_page_2.dart @@ -150,8 +150,11 @@ class ReceiptPage2State extends State { 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(