getDropDownDecor<T> static method
InputDecorator
getDropDownDecor<T>(
- String hints,
- dynamic vatList,
- dynamic selectedVat,
- void callback(
- dynamic
Implementation
static InputDecorator getDropDownDecor<T>(String hints, dynamic vatList,
dynamic selectedVat, void Function(dynamic) callback) {
var widget = InputDecorator(
decoration: SimpleWidget.getDropDownDecoration(hints),
child: DropdownButtonHideUnderline(
child: ButtonTheme(
alignedDropdown: true,
child: DropdownButton<T>(
isDense: true,
icon: const Icon(Icons.keyboard_arrow_down),
value: selectedVat,
onChanged: callback,
items: vatList.map<DropdownMenuItem<T>>((items) {
return DropdownMenuItem<T>(
value: items,
child: Row(
children: [
Padding(
padding: const EdgeInsets.only(top: 7),
child: Text(items.name!),
),
],
),
);
}).toList(),
),
),
),
);
return widget;
}