Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @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;
- });
- }
Add Comment
Please, Sign In to add comment