fix broken dialog

This commit is contained in:
Felix 2019-08-19 15:36:41 +01:00
parent e44687fb6b
commit cda3fc57e9
2 changed files with 8 additions and 5 deletions

View File

@ -134,12 +134,17 @@ class FindOrganisations {
}
setState(() => {_searchEnabled});
},
onSubmitted: _searchEnabled ? (_) {
onSubmitted: ((_) {
if (_searchEnabled) {
SystemChannels.textInput.invokeMethod('TextInput.hide');
var result = _submitSearch(searchBarText.text);
result.then((_) {
setState(() {});
setState(() {
_orgsFetched = true;
});
});
} : null,
}
}),
),
),

View File

@ -241,8 +241,6 @@ class ReceiptPage2State extends State<ReceiptPage2> {
height: 32.0,
child: RaisedButton(
onPressed: () {
// var popupListView = new PopupListView();
// var dialog = popupListView.dialog(context, optionsList, "Choose Organization");
var organisations = new FindOrganisations();
var orgDialog = organisations.dialog(context);
orgDialog.then((organisation) {