For in loop is used in flutter to loop through a list of items. Here is the sample code looping thought list of currency and generating dropdown list item menu for each of it.
const List<String> currenciesList = [
'AUD',
'BRL',
'CAD',
'CNY',
'EUR',
'GBP',
'HKD',
'IDR',
'ILS',
'INR',
'JPY',
'MXN',
'NOK',
'NZD',
'PLN',
'RON',
'RUB',
'SEK',
'SGD',
'USD',
'ZAR'
];
List<DropdownMenuItem> getCurrencyList(){
List<DropdownMenuItem<String>> dropdownItems = [];
for( var item in currenciesList){
String currency = item;
var newItem = DropdownMenuItem(
child: Text(currency),
value: currency,
);
dropdownItems.add(newItem);
};
return dropdownItems;
}