labelText property

String? labelText
final

Optional text that describes the input field.

When the input field is empty and unfocused, the label is displayed on top of the input field (i.e., at the same location on the screen where text may be entered in the input field). When the input field receives focus (or if the field is non-empty), depending on floatingLabelAlignment, the label moves above, either vertically adjacent to, or to the center of the input field.

If a more elaborate label is required, consider using label instead. Only one of label and labelText can be specified.

Implementation

final String? labelText;