Created
March 13, 2018 17:21
-
-
Save boldijar/68cf52a3899e32596771c79b350af142 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 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