Skip to content

Instantly share code, notes, and snippets.

@boldijar
Created March 13, 2018 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boldijar/68cf52a3899e32596771c79b350af142 to your computer and use it in GitHub Desktop.
Save boldijar/68cf52a3899e32596771c79b350af142 to your computer and use it in GitHub Desktop.
@override
Widget build(BuildContext context) {
return new Container(
color: Colors.white,
child: new Center(
child:
new DropdownButton(
value: _currentCity,
items: _dropDownMenuItems,
onChanged: changedDropDownItem,
)
)
);
}
void changedDropDownItem(String selectedCity) {
print("Selected city $selectedCity, we are going to refresh the UI");
setState(() {
_currentCity = selectedCity;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment