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}); setState(() => {_searchEnabled});
}, },
onSubmitted: _searchEnabled ? (_) { onSubmitted: ((_) {
if (_searchEnabled) {
SystemChannels.textInput.invokeMethod('TextInput.hide');
var result = _submitSearch(searchBarText.text); var result = _submitSearch(searchBarText.text);
result.then((_) { result.then((_) {
setState(() {}); setState(() {
_orgsFetched = true;
}); });
} : null, });
}
}),
), ),
), ),

View file

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