pub enum TextFieldVariant {
Outlined,
Filled,
None,
}Expand description
Which of the reference’s two fields this is.
Variants§
Outlined
A box the caller can see all the way round, the floating label notching its top border. The default here.
Filled
A tinted container with a single line under it, the label floating inside the box. The line carries the state; the fill carries the affordance.
None
No container at all — the reference’s InputBorder.none. No fill, no box, no
line: only the value, the hint and whatever icons were asked for.
This is the field a widget puts inside something that is already a container. A
SearchBar is a raised stadium with a field in it, and a field
that drew its own box inside that would be two containers deep with the outer one’s
corners cut by the inner one’s. The reference reaches for it in exactly those
places (search_anchor.dart:1810).
It lays out like Filled — the label floats inside rather than
notching a border, there being no border to notch — and simply paints nothing
behind the content.