Skip to content

Select Input

A customizable dropdown input component for selecting values from a list.

The SelectInput widget provides a flexible and reusable UI for dropdown inputs with customizable labels, icons, styles, and validation. It supports both enabled and disabled states, and integrates seamlessly with form validation.

  • Input Styles: Standard, Floating Label.
  • Customizable: Supports custom labels, icons, styles, and validation.
  • Responsive: Adapts to various screen sizes and layouts.

A dropdown input with a standard label.


A dropdown input with a floating label that moves above the input when a value is selected.


PropertyTypeDescription
widthdoubleThe width of the dropdown input. Defaults to 400.
labelString?The label text displayed when no value is selected.
selectedLabelString?The label text displayed when a value is selected. If null, falls back to label.
labelStyleTextStyle?Custom text style for the label.
disabledboolWhether the dropdown input is disabled. Defaults to false.
showLabelboolWhether to show the label above the dropdown input. Defaults to false.
iconWidget?Custom icon displayed as the trailing icon in the dropdown.
selectedIconWidget?Custom icon displayed as the trailing icon when a value is selected.
dropdownMenuEntriesList<DropdownMenuEntry<T>>The list of dropdown menu entries to display.
onSelectedvoid Function(T?)?Callback function triggered when a value is selected.
focusNodeFocusNode?The focus node for managing focus state.
controllerTextEditingController?The text editing controller for managing the input value.
errorTextString?The error text displayed below the dropdown input.
validatorString? Function(T?)?Validator function for validating the selected value.
initialValueT?The initial value of the dropdown input.
inputDecorationThemeInputDecorationTheme?Custom input decoration theme for styling the dropdown input.