DDSDropdown class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DDSDropdown
Constructors
-
DDSDropdown.new({Key? key, required List<
Map< options, String placeholder = '', String label = '', TextStyle? labelTextStyle, dynamic values, double? optionsDropdownWidth = 200, required dynamic onSelect(dynamic), Border? border, BorderRadius? borderRadius, EdgeInsets? padding, double? width = 300, double dropdownOptionsOffset = 10, double? height, double? dropdownMaxHeight, double? chipWidth, double? chipHeight, Color? chipBackgroundColor, Color? chipBorderColor, Color chipTextColor = Colors.white, Color? chipCloseIconColor = Colors.white, double? chipCloseIconSize = 18.0, Color? arrowIconColor, bool enableArrowRotation = true, Icon? dropdownArrowIcon, bool isMultiSelect = false, bool isSearchable = false, bool required = false, bool showChips = true, int? maxSelectableItems, Icon? selectIcon, Widget? emptyState, String? errorMessage = 'This field is required', TextStyle? errorMessageTextStyle, Color? dropdownBackgroundColor = Colors.white, Color? dropdownOptionsTextColor = Colors.black, Color? selectedItemBackgroundColor, Color? placeholderTextColor = Colors.grey, TextStyle? placeholderTextStyle, Color? selectedTextColor = Colors.black, TextStyle? selectedTextStyle, Color? containerBackgroundColor = Colors.white, bool showSelectionBadge = true, Color? badgeBackgroundColor, Color? badgeTextColor = Colors.white, double? badgeSize = 24.0, TextStyle? badgeTextStyle, InputDecoration? searchInputDecoration = const InputDecoration(prefixIcon: Icon(Icons.search), border: OutlineInputBorder(), contentPadding: EdgeInsets.symmetric(vertical: 8, horizontal: 12), filled: true, fillColor: Colors.white), double? dropdownCustomMaxWidth = 0.0, Color? searchCursorColor, Color? searchCursorErrorColor, double? searchCursorHeight, double searchCursorWidth = 2.0, Radius? searchCursorRadius, bool? searchCursorOpacityAnimates, bool? searchShowCursor, String? searchPlaceholder, TextStyle? searchPlaceholderStyle, TextStyle? searchInputTextStyle, TextEditingController? searchController, bool stickySearchField = true, double? searchFieldWidth, double? searchFieldHeight, EdgeInsets? searchFieldPadding, Color? checkboxCheckedColor, Color? checkboxUncheckedColor, Color? checkboxCheckedBorderColor, Color? checkboxUncheckedBorderColor, CheckboxSize? checkboxSize, CheckboxShape? checkboxShape, CheckboxVariant? checkboxVariant, Icon? checkboxIcon, Color? checkboxIconColor, double? checkboxIconSize, Border? checkboxBorder, bool? isOpen, VoidCallback? onDropdownToggle, VoidCallback? onDropdownOpen, VoidCallback? onDropdownClose, bool closeOnOutsideClick = true, TextStyle? optionLabelTextStyle, double? optionLabelFontSize, FontWeight? optionLabelFontWeight, Color? optionLabelColor, double? optionLabelLetterSpacing, double? optionLabelLineHeight, TextDecoration? optionLabelDecoration, Color? optionLabelDecorationColor, List<String, dynamic> >Shadow> ? optionLabelShadows, FontStyle? optionLabelFontStyle, TextAlign? optionLabelTextAlign, int? optionLabelMaxLines, TextOverflow? optionLabelOverflow, TextStyle? selectedOptionLabelTextStyle, double? selectedOptionLabelFontSize, FontWeight? selectedOptionLabelFontWeight, Color? selectedOptionLabelColor, double? selectedOptionLabelLetterSpacing, double? selectedOptionLabelLineHeight, TextDecoration? selectedOptionLabelDecoration, Color? selectedOptionLabelDecorationColor, List<Shadow> ? selectedOptionLabelShadows, FontStyle? selectedOptionLabelFontStyle, TextAlign? selectedOptionLabelTextAlign, int? selectedOptionLabelMaxLines, TextOverflow? selectedOptionLabelOverflow, Border? dropdownBorder, Color? dropdownBorderColor, double? dropdownBorderWidth = 1.0, BorderRadius? dropdownBorderRadius, List<BoxShadow> ? dropdownBoxShadow, bool enableSearchCustomSelection = false, Widget? searchCustomSelectionHandleWidget, Color? searchSelectionHandleColor, Color? searchTextSelectionColor, bool searchAutofocus = false, TextInputAction? searchTextInputAction, ValueChanged<String> ? searchOnSubmitted}) -
const
Properties
- arrowIconColor → Color?
-
final
- badgeBackgroundColor → Color?
-
final
- badgeSize → double?
-
final
- badgeTextColor → Color?
-
final
- badgeTextStyle → TextStyle?
-
final
- border → Border?
-
final
- borderRadius → BorderRadius?
-
final
- checkboxBorder → Border?
-
final
- checkboxCheckedBorderColor → Color?
-
final
- checkboxCheckedColor → Color?
-
final
- checkboxIcon → Icon?
-
final
- checkboxIconColor → Color?
-
final
- checkboxIconSize → double?
-
final
- checkboxShape → CheckboxShape?
-
final
- checkboxSize → CheckboxSize?
-
final
- checkboxUncheckedBorderColor → Color?
-
final
- checkboxUncheckedColor → Color?
-
final
- checkboxVariant → CheckboxVariant?
-
final
- chipBackgroundColor → Color?
-
final
- chipBorderColor → Color?
-
final
- chipCloseIconColor → Color?
-
final
- chipCloseIconSize → double?
-
final
- chipHeight → double?
-
final
- chipTextColor → Color
-
final
- chipWidth → double?
-
final
- closeOnOutsideClick → bool
-
final
- containerBackgroundColor → Color?
-
final
- dropdownArrowIcon → Icon?
-
final
- dropdownBackgroundColor → Color?
-
final
- dropdownBorder → Border?
-
final
- dropdownBorderColor → Color?
-
final
- dropdownBorderRadius → BorderRadius?
-
final
- dropdownBorderWidth → double?
-
final
-
dropdownBoxShadow
→ List<
BoxShadow> ? -
final
- dropdownCustomMaxWidth → double?
-
final
- dropdownMaxHeight → double?
-
final
- dropdownOptionsOffset → double
-
final
- dropdownOptionsTextColor → Color?
-
final
- emptyState → Widget?
-
final
- enableArrowRotation → bool
-
final
- enableSearchCustomSelection → bool
-
final
- errorMessage → String?
-
final
- errorMessageTextStyle → TextStyle?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
final
- isMultiSelect → bool
-
final
- isOpen → bool?
-
final
- isSearchable → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
final
- labelTextStyle → TextStyle?
-
final
- maxSelectableItems → int?
-
final
- onDropdownClose → VoidCallback?
-
final
- onDropdownOpen → VoidCallback?
-
final
- onDropdownToggle → VoidCallback?
-
final
- onSelect → dynamic Function(dynamic)
-
final
- optionLabelColor → Color?
-
final
- optionLabelDecoration → TextDecoration?
-
final
- optionLabelDecorationColor → Color?
-
final
- optionLabelFontSize → double?
-
final
- optionLabelFontStyle → FontStyle?
-
final
- optionLabelFontWeight → FontWeight?
-
final
- optionLabelLetterSpacing → double?
-
final
- optionLabelLineHeight → double?
-
final
- optionLabelMaxLines → int?
-
final
- optionLabelOverflow → TextOverflow?
-
final
-
optionLabelShadows
→ List<
Shadow> ? -
final
- optionLabelTextAlign → TextAlign?
-
final
- optionLabelTextStyle → TextStyle?
-
final
-
options
→ List<
Map< String, dynamic> > -
final
- optionsDropdownWidth → double?
-
final
- padding → EdgeInsets?
-
final
- placeholder → String
-
final
- placeholderTextColor → Color?
-
final
- placeholderTextStyle → TextStyle?
-
final
- required → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchAutofocus → bool
-
final
- searchController → TextEditingController?
-
final
- searchCursorColor → Color?
-
final
- searchCursorErrorColor → Color?
-
final
- searchCursorHeight → double?
-
final
- searchCursorOpacityAnimates → bool?
-
final
- searchCursorRadius → Radius?
-
final
- searchCursorWidth → double
-
final
- searchCustomSelectionHandleWidget → Widget?
-
final
- searchFieldHeight → double?
-
final
- searchFieldPadding → EdgeInsets?
-
final
- searchFieldWidth → double?
-
final
- searchInputDecoration → InputDecoration?
-
final
- searchInputTextStyle → TextStyle?
-
final
-
searchOnSubmitted
→ ValueChanged<
String> ? -
final
- searchPlaceholder → String?
-
final
- searchPlaceholderStyle → TextStyle?
-
final
- searchSelectionHandleColor → Color?
-
final
- searchShowCursor → bool?
-
final
- searchTextInputAction → TextInputAction?
-
final
- searchTextSelectionColor → Color?
-
final
- selectedItemBackgroundColor → Color?
-
final
- selectedOptionLabelColor → Color?
-
final
- selectedOptionLabelDecoration → TextDecoration?
-
final
- selectedOptionLabelDecorationColor → Color?
-
final
- selectedOptionLabelFontSize → double?
-
final
- selectedOptionLabelFontStyle → FontStyle?
-
final
- selectedOptionLabelFontWeight → FontWeight?
-
final
- selectedOptionLabelLetterSpacing → double?
-
final
- selectedOptionLabelLineHeight → double?
-
final
- selectedOptionLabelMaxLines → int?
-
final
- selectedOptionLabelOverflow → TextOverflow?
-
final
-
selectedOptionLabelShadows
→ List<
Shadow> ? -
final
- selectedOptionLabelTextAlign → TextAlign?
-
final
- selectedOptionLabelTextStyle → TextStyle?
-
final
- selectedTextColor → Color?
-
final
- selectedTextStyle → TextStyle?
-
final
- selectIcon → Icon?
-
final
- showChips → bool
-
final
- showSelectionBadge → bool
-
final
- stickySearchField → bool
-
final
- values → dynamic
-
final
- width → double?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _DDSDropdownState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited