Skip to content
On this page

Combobox

An editable selection control with a list of options.

Combobox in FluttyUICombobox in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

Combobox

const Combobox({
  super.key,
  this.size,
  required this.options,
  required this.onChanged,
  this.value,
  this.controller,
  this.onQueryChanged,
  this.focusNode,
  this.autofocus = false,
  this.readOnly = false,
  this.autocorrect = true,
  this.textInputAction,
  this.textCapitalization = TextCapitalization.none,
  this.autofillHints,
  this.inputFormatters,
  this.onEditingComplete,
  this.onSubmitted,
  this.placeholder = 'Select or search...',
  this.backgroundColor,
  this.foregroundColor,
  this.placeholderColor,
  this.borderColor,
  this.focusColor,
  this.selectedColor,
  this.borderRadius,
  this.menuBorderRadius,
  this.menuPadding,
  this.maxMenuHeight = 280,
  this.padding,
  this.optionPadding,
  this.height,
  this.fontSize,
  this.optionFontSize,
  this.maxOptions = 6,
  this.enabled = true,
  this.width,
  this.optionBuilder,
});
ParameterTypeRequiredDefault
keyKey?Nonull
sizeComponentSize?Nonull
optionsList<ComboboxOption<T>>Yes—
onChangedValueChanged<T>Yes—
valueT?Nonull
controllerTextEditingController?Nonull
onQueryChangedValueChanged<String>?Nonull
focusNodeFocusNode?Nonull
autofocusboolNofalse
readOnlyboolNofalse
autocorrectboolNotrue
textInputActionTextInputAction?Nonull
textCapitalizationTextCapitalizationNoTextCapitalization.none
autofillHintsIterable<String>?Nonull
inputFormattersList<TextInputFormatter>?Nonull
onEditingCompleteVoidCallback?Nonull
onSubmittedValueChanged<String>?Nonull
placeholderStringNo'Select or search...'
backgroundColorColor?Nonull
foregroundColorColor?Nonull
placeholderColorColor?Nonull
borderColorColor?Nonull
focusColorColor?Nonull
selectedColorColor?Nonull
borderRadiusdouble?Nonull
menuBorderRadiusdouble?Nonull
menuPaddingEdgeInsetsGeometry?Nonull
maxMenuHeightdoubleNo280
paddingEdgeInsetsGeometry?Nonull
optionPaddingEdgeInsetsGeometry?Nonull
heightdouble?Nonull
fontSizedouble?Nonull
optionFontSizedouble?Nonull
maxOptionsintNo6
enabledboolNotrue
widthdouble?Nonull
optionBuilderWidget Function(BuildContext context, ComboboxOption<T> option)?Nonull

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/forms/combobox/combobox.dart

This reference is generated from the Combobox declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI