DropdownDecoration constructor
const
DropdownDecoration({
- TextStyle? labelTextStyle,
- TextStyle? hintTextStyle,
- TextStyle? errorMessageTextStyle,
- Color? outlineBorderColor,
- Color? borderColor,
- Color? errorBorderColor,
- double fieldHeight = 52,
- BorderRadius? borderRadius,
- Color? backgroundColor,
- bool reserveSpaceForValidationMessage = true,
- TextStyle? dropdownTextStyle = const TextStyle(fontSize: 14),
Creates a new DropdownDecoration instance with optional customization.
labelTextStyle
: Style for the label text.hintTextStyle
: Style for the hint text.dropdownTextStyle
: Style for the text inside the dropdown items (default font size is14
).errorMessageTextStyle
: Style for error messages.outlineBorderColor
: Color for the outline border.borderColor
: Color for the normal state border.errorBorderColor
: Color for the error state border.fieldHeight
: Height of the dropdown field (default is52
).borderRadius
: Border radius for rounded corners.backgroundColor
: Color for the dropdown background.reserveSpaceForValidationMessage
: Indicator wether validation error container will be present even there is no error to display
Implementation
const DropdownDecoration({
this.labelTextStyle,
this.hintTextStyle,
this.errorMessageTextStyle,
this.outlineBorderColor,
this.borderColor,
this.errorBorderColor,
this.fieldHeight = 52,
this.borderRadius,
this.backgroundColor,
this.reserveSpaceForValidationMessage = true,
this.dropdownTextStyle = const TextStyle(
fontSize: 14,
),
});