Skip to content
Get started
Menu
Get started

Select

Choose an occupation or payment method.

Occupation and payment method selectors with selected, invalid and disabled states.Occupation and payment method selectors with selected, invalid and disabled states.
Select
Occupation and payment method selectors with selected, invalid and disabled states at 200 percent text.
200% text
Occupation and payment method selectors with selected, invalid and disabled states at 200 percent text, in Indonesian.
200% text, Indonesian
example/lib/screens/gallery_forms.dart
PaymentSelect<String>(
label: 'Occupation',
options: _occupations,
value: null,
onChanged: null,
);

Single selection uses radios and closes on a changed choice. Multiple selection uses draft checkboxes and Apply. Seven or more options add a local filter. Disabled choices explain why. Focus returns to the trigger. Re-tapping the selected radio leaves the sheet open. validator integrates with Form; focusNode supports focusing the first error. Fields fill the available width.

Variants: single, multiple.

Situation Variant / composition Payment example
Problem category single Use a short bounded list; null leaves Send disabled until a category is selected.

Use Search field for long province lists.

Default, focused, disabled and error. Errors include an icon, text and an edge. Selection controls support hardware keyboards.

Height. An empty select keeps its hint on one line (ellipsized), so it is as tall as its siblings at 200% text (#65).

Do: Use a short bounded list; null leaves Send disabled until a category is selected.

Don’t: Offer unsupported options that the host cannot handle.

Use short, specific labels and explain how to correct an error.

Input text is 16 dp. Legends precede fields in reading order. Labels and errors stay in semantics when visually hidden. Pickers restore focus.

Example kyc onboarding screen with synthetic dataExample kyc onboarding screen with synthetic data
Example: kyc onboarding

The select box follows the field-family PaymentFieldTheme: fill, resting outline, corners, tap highlight and the selected value’s typography. The option list and sheet rows keep their own styling. See Text field customization.

PaymentSelect

class PaymentSelect extends StatefulWidget · lib/src/forms/select.dart

Field trigger with a radio sheet, or draft checkboxes and Apply.

ParameterTypeDefaultDescription
label:requiredString—label for this field.
options:requiredList<PaymentSelectOption<T>>—options for this field.
value:requiredT?—value for this field.
onChanged:requiredValueChanged<T>?—onChanged for this field.
hint:String?—hint for this field.
description:String?—description for this field.
errorText:String?—errorText for this field.
validator:FormFieldValidator<T>?—validator for this field.
required:boolfalserequired for this field.
hiddenElements:Set<PaymentFieldPart>const {}hiddenElements for this field.
size:PaymentSizePaymentSize.mediumsize for this field.
focusNode:FocusNode?—focusNode for this field.

PaymentSelect.multiple(…) — Stages a set of values in a checkbox sheet and reports on Apply. onChanged receives the complete selected set; null disables the field.

ParameterTypeDefaultDescription
key:Key?——
label:requiredString——
options:requiredList<PaymentSelectOption<T>>——
values:requiredSet<T>——
onChanged:requiredValueChanged<Set<T>>?——
hint:String?——
description:String?——
errorText:String?——
validator:FormFieldValidator<Set<T>>?——
required:boolfalse—
hiddenElements:Set<PaymentFieldPart>const {}—
size:PaymentSizePaymentSize.medium—
focusNode:FocusNode?——

PaymentSelectOption

class PaymentSelectOption · lib/src/forms/select.dart

One option; a disabled reason explains unavailable choices.

ParameterTypeDefaultDescription
value:requiredT—Host value.
label:requiredString—Visible option name.
disabledReason:String?—Disables the option with an explanation.