getDropDown method

Widget getDropDown(
  1. FormFieldState<String> state
)

Implementation

Widget getDropDown(FormFieldState<String> state) {
  formState = state;

  var items = _itens.map((item) {
    return new DropdownMenuItem<String>(
      value: item.presentation,
      child: _buildPresentation(item),
    );
  }).toList();

  return DropdownButton<String>(
    value: this.selectedText,
    isDense: true,
    iconEnabledColor: Colors.grey,
    dropdownColor: Colors.white,
    onChanged: (String? selected) => setSelected(selected),
    items: items,
  );
}