buildItemList method
Implementation
List<DropdownMenuItem<T>> buildItemList() {
var itemList = <DropdownMenuItem<T>>[];
for (var i = 0; i < items!.length; i++) {
itemList.add(DropdownMenuItem<T>(
child: Text(
optionTitles == null ? items![i].toString() : optionTitles![i]),
value: items![i],
));
}
return itemList;
}