safer code
This commit is contained in:
parent
2218422df4
commit
9cba3e037c
2 changed files with 7 additions and 3 deletions
|
@ -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<Organisation>();
|
||||
|
||||
Future<int> _submitSearch(String search) async {
|
||||
_searchEnabled = false;
|
||||
|
|
|
@ -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(
|
||||
|
|
Reference in a new issue