form/fields/field_widgets library

Classes

BooleanFieldWidget
toggle and checkbox. Same boolean value, different control.
ColorFieldWidget
color. A text field holding the value in the format the panel declared (ColorComponent.format), with a live swatch beside it — chosen over a graphical picker, deliberately: a hand-rolled HSV widget's colour maths is easy to get subtly wrong and hard to test (P8 design doc).
DateFieldWidget
date and datetime. Picking goes through the built-in showDatePicker/showTimePicker; display goes through MaterialLocalizations, which is locale-aware without needing intl. The reported value is always DateTime.toIso8601String().
FileFieldWidget
file. Never directly typed into — state.value is always a stored path (or, when FileComponent.multiple, a list of them), never free text — so the display control is permanently read-only. The choose control is separate: a choose/replace button (single) or an add button beside the stored list (multiple), shown only when every one of these holds, same "hard gate" rule the file atop this list documents for every other field — state.enabled == false disables the real control, not just its colours:
KeyValueFieldWidget
keyvalue. One row per pair, each a key cell and a value cell side by side.
NumberFieldWidget
number. Reports a parsed num, never the raw string — the contract's numeric fields expect a number back, not text that happens to look like one.
PhoneFieldWidget
phone. The keyboard is the only client-side specialization: the value is returned verbatim and the server remains the sole formatter/validator.
RadioFieldWidget
radio. Same SelectComponent select parses onto — Radio shares Select's config shape server-side — but rendered as every option stacked and visible at once, never behind a dropdown tap: the design spec's stated reason a phone renders a Radio as itself rather than folding it into SelectFieldWidget.
RemoteSelectField
A select whose options /schema refused to inline.
RepeaterFieldWidget
repeater. One card per row, built by walking RepeaterComponent.children — the item template, published once and walked once per row in the value, never re-parsed per row.
SelectFieldWidget
select and multiselect. Reports the chosen SelectOption.value — the contract allows int values (foreign keys) with string labels, so the label is display-only and must never be what's sent back.
SliderFieldWidget
slider. A Material Slider when SliderComponent.multiple is false, a RangeSlider when true — the value is a number or a two-element List respectively, round-tripped through the ordinary form paths. Bounds and divisions come from the node's config; the enforceable half of the same declaration rides the ordinary rules block into the shared validator, so there is no slider-specific validation here.
TagsFieldWidget
tags. Chips for the tags already chosen, each with its own remove affordance, plus one text field that commits a tag on submit.
TextFieldWidget
The widgets a form field is built from — one per writable contract type.
TimeFieldWidget
time. Flutter's own showTimePicker, so no dependency — but it offers neither bounds nor seconds, so both are handled here:
ToggleButtonsFieldWidget
toggle_buttons. The same flattened options select/radio carry, shown as tappable choice controls rather than behind a dropdown — a Wrap of chips, not a single row, because the type has no optionsUrl escape: an over-cap field inlines its full option list and this widget must render an arbitrarily long one. Single writes the chosen SelectOption.value as a scalar (tapping the selected chip clears to null, Filament's own single behaviour); multiple toggles membership and writes a List — the select vs multiselect split, through the same form paths.
UnsupportedFieldWidget
Honest fallback for a known contract type whose optional renderer was not registered by the host application.