DropdownDecoration class
A class to define and customize the visual appearance of a dropdown widget.
This class provides customizable styling options for different aspects of a dropdown field such as text styles, border colors, and field height.
Constructors
- DropdownDecoration.new({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.
const
Properties
- backgroundColor → Color?
-
Color for the dropdown field background, default is
transparent
. .final - borderColor → Color?
-
Color for the border of the dropdown field in its normal state.
final
- borderRadius → BorderRadius?
-
The border radius for the dropdown field.
final
- dropdownTextStyle → TextStyle?
-
Text style for the items displayed within the dropdown menu.
final
- errorBorderColor → Color?
-
Color for the border of the dropdown field when an error occurs.
final
- errorMessageTextStyle → TextStyle?
-
Text style for displaying error messages below the dropdown field.
final
- fieldHeight → double
-
Height of the dropdown field.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hintTextStyle → TextStyle?
-
Text style for the hint text displayed inside the dropdown.
final
- labelTextStyle → TextStyle?
-
Text style for the label of the dropdown field.
final
- outlineBorderColor → Color?
-
Color for the outline border of the dropdown field.
final
- reserveSpaceForValidationMessage → bool
-
Indicator wether validation error container will be present even
there is no error to display
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited