Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

dropdown item from the list flutter

  List<DropdownMenuItem<String>> getDropdownItems() {
    List<DropdownMenuItem<String>> dropDownItems = [];

    for (String currency in currenciesList) {
      var newDropdown = DropdownMenuItem(
        child: Text(currency),
        value: currency,
      );

      dropDownItems.add(newDropdown);
    }
    return dropDownItems;
  }
Source by www.allaboutflutter.com #
 
PREVIOUS NEXT
Tagged: #dropdown #item #list #flutter
ADD COMMENT
Topic
Name
3+9 =