CustomDropdownConfig class
Configuration class for CustomDropdown appearance and behavior
Constructors
- CustomDropdownConfig({double height = 52, double radius = 10, EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 12), Color? borderColor, Color? dropdownColor, Color? disabledColor, Color? errorBorderColor, bool showDivider = true, bool enableSearch = true, String searchHint = "Search...", String noResultsText = "No results found", double elevation = 8.0, double borderWidth = 1.0, double focusedBorderWidth = 1.5, double errorBorderWidth = 2.0, Color? searchIconColor, Color? selectedItemColor, TextStyle? itemTextStyle, TextStyle? selectedTextStyle, Color? shadowColor, Duration animationDuration = const Duration(milliseconds: 200)})
-
const
Properties
- animationDuration → Duration
-
Duration for animations
final
- borderColor → Color?
-
Border color for the dropdown field
final
- borderWidth → double
-
Border width for the dropdown field
final
- disabledColor → Color?
-
Background color when dropdown is disabled
final
- dropdownColor → Color?
-
Background color for dropdown and overlay
final
- elevation → double
-
Elevation for the dropdown overlay menu
final
- enableSearch → bool
-
Enable search functionality in dropdown
final
- errorBorderColor → Color?
-
Border color when validation error occurs
final
- errorBorderWidth → double
-
Border width when validation error occurs
final
- focusedBorderWidth → double
-
Border width when dropdown has focus
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
Height of the dropdown field
final
- itemTextStyle → TextStyle?
-
Text style for items in dropdown
final
-
Maximum height of the dropdown menu overlay
final
-
Gap between dropdown field and overlay menu
final
- noResultsText → String
-
Text to display when no results found
final
- padding → EdgeInsets
-
Padding inside the dropdown field
final
- radius → double
-
Border radius for dropdown and overlay menu
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchHint → String
-
Placeholder text for search field
final
- searchIconColor → Color?
-
Color of the search icon
final
- selectedItemColor → Color?
-
Background color for selected item in dropdown
final
- selectedTextStyle → TextStyle?
-
Text style for selected item display
final
- shadowColor → Color?
-
Overlay menu background shadow color
final
- showDivider → bool
-
Show divider between search field and items
final
Methods
-
copyWith(
{double? height, double? radius, EdgeInsets? padding, Color? borderColor, Color? dropdownColor, Color? disabledColor, Color? errorBorderColor, bool? showDivider, bool? enableSearch, String? searchHint, String? noResultsText, double? elevation, double? borderWidth, double? focusedBorderWidth, double? errorBorderWidth, Color? searchIconColor, Color? selectedItemColor, TextStyle? itemTextStyle, TextStyle? selectedTextStyle, Color? shadowColor, Duration? animationDuration}) → CustomDropdownConfig - Create a copy with modified values
-
getBorderColor(
BuildContext context, {bool isFocused = false, bool hasError = false}) → Color - Get border color based on state
-
getBorderWidth(
{bool isFocused = false, bool hasError = false}) → double - Get border width based on state
-
getDropdownColor(
BuildContext context, {bool isEnabled = true}) → Color - Get dropdown background color
-
getSelectedItemColor(
BuildContext context) → Color - Get selected item background color
-
getShadowColor(
) → Color - Get shadow color for overlay
-
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