decorationBuilder property
final
The builder function used to create the InputDecoration passed to the text field.
If a value is provided for this property and the resulting InputDecoration.suffixIcon is null, a default IconButton is assigned as the suffix icon. This button's icon will use trailingIcon and selectedTrailingIcon if those are explicitly defined; otherwise, it defaults to Icons.arrow_drop_down for the collapsed state and Icons.arrow_drop_up for the expanded state.
If null, the default builder creates a decoration where:
- InputDecoration.label is set to label.
- InputDecoration.hintText is set to hintText.
- InputDecoration.helperText is set to helperText.
- InputDecoration.errorText is set to errorText.
- InputDecoration.prefixIcon is set to leadingIcon.
- InputDecoration.suffixIcon is set to an IconButton which uses trailingIcon and selectedTrailingIcon if defined, or Icons.arrow_drop_down and Icons.arrow_drop_up otherwise.
Implementation
final DropdownMenuDecorationBuilder? decorationBuilder;