Skip to content

Instantly share code, notes, and snippets.

@becek2n
Created May 8, 2020 15:55
Show Gist options
  • Save becek2n/d4757064407a7fdf06d016e3302edb6a to your computer and use it in GitHub Desktop.
Save becek2n/d4757064407a7fdf06d016e3302edb6a to your computer and use it in GitHub Desktop.
Padding(
padding: const EdgeInsets.only(top: 20.0, right: 45.0, left: 45.0),
child: new FormField(
builder: (FormFieldState state) {
return InputDecorator(
decoration: InputDecoration(
icon: const Icon(Icons.business),
labelText: 'Department',
),
child: new DropdownButtonHideUnderline(
child: new DropdownButton(
isDense: true,
onChanged: (newValue) {
setState(() {
_idDepartment= newValue.toString();
});
},
items: _department.map((item) {
return DropdownMenuItem(
child: Text(item.value),
value: item.id,
);
}).toList(),
value: _idDepartment,
),
),
);
},
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment