Created
May 6, 2019 16:38
-
-
Save lwinged/957abb43627f3a17fdd5572cf2274c72 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@override | |
Widget build(BuildContext context) { | |
return Column( | |
children: <Widget>[ | |
TextField( | |
controller: _searchController, | |
decoration: InputDecoration( | |
hintText: 'Address', | |
border: OutlineInputBorder(), | |
), | |
onChanged: (_) => _refreshState(), | |
onSubmitted: validForSearch | |
? (query) => widget.onSubmit(context, query) | |
: null, | |
), | |
SizedBox(height: 8.0), | |
Row( | |
children: <Widget>[ | |
RaisedButton( | |
child: Text("Go"), | |
onPressed: validForSearch | |
? () => widget.onSubmit(context, _searchController.text) | |
: null, | |
), | |
SizedBox(width: 8.0), | |
RaisedButton( | |
child: Text("My location"), | |
onPressed: () => widget.onSubmit(context, SEARCH_MY_LOCATION), | |
) | |
], | |
) | |
], | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment