DropdownPlusTheme class
Defines the visual theme for SearchableDropdownPlus and MultiSelectDropdownPlus widgets.
All properties are optional. When null, sensible defaults derived from the
ambient Theme / ColorScheme are used automatically.
Example — dark theme override
DropdownPlusTheme(
backgroundColor: Colors.grey[900],
menuBackgroundColor: Colors.grey[850],
borderColor: Colors.white24,
activeBorderColor: Colors.blueAccent,
hintStyle: TextStyle(color: Colors.white54),
itemTextStyle: TextStyle(color: Colors.white),
selectedItemTextStyle: TextStyle(color: Colors.blueAccent, fontWeight: FontWeight.bold),
chipBackgroundColor: Colors.blueAccent.withOpacity(0.2),
chipTextStyle: TextStyle(color: Colors.blueAccent),
borderRadius: 8,
checkboxActiveColor: Colors.blueAccent,
)
Constructors
- DropdownPlusTheme({Color? backgroundColor, Color? borderColor, Color? activeBorderColor, double borderWidth = 1.0, double activeBorderWidth = 1.5, double borderRadius = 10.0, EdgeInsets? contentPadding, TextStyle? hintStyle, TextStyle? triggerTextStyle, Color? searchBarBackgroundColor, double searchBarBorderRadius = 10.0, TextStyle? searchHintStyle, TextStyle? searchTextStyle, Color? searchIconColor, TextStyle? itemTextStyle, TextStyle? selectedItemTextStyle, Color? selectedItemBackgroundColor, EdgeInsets? itemPadding, Color? dividerColor, Color? checkboxBorderColor, Color? checkboxActiveColor, double checkboxSize = 22.0, Color? chipBackgroundColor, TextStyle? chipTextStyle, Color? chipBorderColor, double chipBorderRadius = 16.0, Color? chipDeleteIconColor, double chipDeleteIconSize = 14.0, Color? countChipBackgroundColor, TextStyle? countChipTextStyle, Color? loadingIndicatorColor, TextStyle? loadingTextStyle, TextStyle? noResultsTextStyle, Color? noResultsIconColor, Color? arrowIconColor, double arrowIconSize = 22.0, Color? headerBackgroundColor, TextStyle? selectAllTextStyle, TextStyle? selectedCountTextStyle, Color? selectedCountBackgroundColor})
-
const
Properties
- activeBorderColor → Color?
-
Border color when the dropdown is open / focused.
final
- activeBorderWidth → double
-
Border width when the dropdown is open. Default:
1.5.final - arrowIconColor → Color?
-
Color of the animated caret / arrow icon in the trigger button.
final
- arrowIconSize → double
-
Size of the arrow icon. Default:
22.0.final - backgroundColor → Color?
-
Background color of the dropdown trigger button. Defaults to white.
final
- borderColor → Color?
-
Border color when the dropdown is closed.
final
- borderRadius → double
-
Corner radius for the trigger button. Default:
10.0.final - borderWidth → double
-
Border width when the dropdown is closed. Default:
1.0.final - checkboxActiveColor → Color?
-
Fill / border color of the circular checkbox when selected.
final
- checkboxBorderColor → Color?
-
Border color of the circular checkbox when unselected.
final
- checkboxSize → double
-
Diameter of the circular checkbox. Default:
22.0.final - chipBackgroundColor → Color?
-
Background color of the selected-item chips.
final
- chipBorderColor → Color?
-
Border color of the selected-item chips.
final
- chipBorderRadius → double
-
Corner radius of the chips. Default:
16.0.final - chipDeleteIconColor → Color?
-
Color of the delete (×) icon on each chip.
final
- chipDeleteIconSize → double
-
Size of the delete (×) icon. Default:
14.0.final - chipTextStyle → TextStyle?
-
Text style inside the selected-item chips.
final
- contentPadding → EdgeInsets?
-
Padding inside the trigger button. Defaults to
EdgeInsets.symmetric(horizontal: 14, vertical: 12).final - countChipBackgroundColor → Color?
-
Background color of the "+N more" overflow chip.
final
- countChipTextStyle → TextStyle?
-
Text style of the "+N more" overflow chip.
final
- dividerColor → Color?
-
Color of the thin divider lines between items.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerBackgroundColor → Color?
-
Background color of the "Select All / Clear" header row.
final
- hintStyle → TextStyle?
-
Style of the hint / placeholder text.
final
- itemPadding → EdgeInsets?
-
Padding for each item row. Defaults to
EdgeInsets.symmetric(horizontal: 16, vertical: 12).final - itemTextStyle → TextStyle?
-
Text style for non-selected items in the list.
final
- loadingIndicatorColor → Color?
-
Color of the circular progress indicator shown while loading.
final
- loadingTextStyle → TextStyle?
-
Text style of the optional loading message.
final
-
Background color of the floating menu panel. Defaults to white.
final
-
Border color of the floating menu panel.
final
-
Corner radius of the floating menu panel. Default:
12.0.final -
Elevation of the floating menu panel. Default:
12.0.final -
Maximum height of the floating menu panel. Default:
320.0.final - noResultsIconColor → Color?
-
Color of the "no results" icon.
final
- noResultsTextStyle → TextStyle?
-
Text style of the "no results" message.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchBarBackgroundColor → Color?
-
Background color of the search input container.
final
- searchBarBorderRadius → double
-
Corner radius of the search input container. Default:
10.0.final - searchHintStyle → TextStyle?
-
Hint/placeholder style for the search input.
final
- searchIconColor → Color?
-
Color of the leading search icon.
final
- searchTextStyle → TextStyle?
-
Style for text typed in the search input.
final
- selectAllTextStyle → TextStyle?
-
Text style of the "Select All" / "Clear All" button.
final
- selectedCountBackgroundColor → Color?
-
Background color of the "N selected" badge pill.
final
- selectedCountTextStyle → TextStyle?
-
Text style of the "N selected" badge.
final
- selectedItemBackgroundColor → Color?
-
Background color applied to selected item rows.
final
- selectedItemTextStyle → TextStyle?
-
Text style for the currently selected item(s).
final
- triggerTextStyle → TextStyle?
-
Style of the selected value text shown in the trigger (single-select).
final
Methods
-
copyWith(
{Color? backgroundColor, Color? borderColor, Color? activeBorderColor, double? borderWidth, double? activeBorderWidth, double? borderRadius, EdgeInsets? contentPadding, TextStyle? hintStyle, TextStyle? triggerTextStyle, Color? searchBarBackgroundColor, double? searchBarBorderRadius, TextStyle? searchHintStyle, TextStyle? searchTextStyle, Color? searchIconColor, TextStyle? itemTextStyle, TextStyle? selectedItemTextStyle, Color? selectedItemBackgroundColor, EdgeInsets? itemPadding, Color? dividerColor, Color? checkboxBorderColor, Color? checkboxActiveColor, double? checkboxSize, Color? chipBackgroundColor, TextStyle? chipTextStyle, Color? chipBorderColor, double? chipBorderRadius, Color? chipDeleteIconColor, double? chipDeleteIconSize, Color? countChipBackgroundColor, TextStyle? countChipTextStyle, Color? loadingIndicatorColor, TextStyle? loadingTextStyle, TextStyle? noResultsTextStyle, Color? noResultsIconColor, Color? arrowIconColor, double? arrowIconSize, Color? headerBackgroundColor, TextStyle? selectAllTextStyle, TextStyle? selectedCountTextStyle, Color? selectedCountBackgroundColor}) → DropdownPlusTheme - Returns a copy of this theme with the given fields replaced.
-
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