SearchDropList<T> class

A customizable searchable dropdown list widget.

SearchDropList provides a UI component that allows users to search and select an item from a dropdown list. Supports custom styling, overlay, borders, shadow, and clear/reset functionality.

Inheritance

Constructors

SearchDropList({Key? key, required DropdownSearchListModel<T> dropListModel, required OptionItemsSearch<T>? itemSelected, required ValueChanged<OptionItemsSearch<T>> onOptionSelected, required String hintText, Color? dropboxColor, Color? dropBoxBorderColor, Color? scrollThumbColor, Radius? scrollRadius, double? scrollThickness, double? heightBottomContainer, Color? textColorItem, Color? textColorTitle, bool showArrowIcon = false, bool showClearButton = false, VoidCallback? onClear, double? height, double? width, EdgeInsetsGeometry? containerPadding, EdgeInsetsGeometry? containerMargin, Decoration? containerDecoration, required bool showBorder, required bool enable, Color? borderColor, Color? shadowColor, required double borderSize, BorderRadiusGeometry? borderRadius, List<BoxShadow>? boxShadow})
Creates a SearchDropList widget.
const

Properties

borderColor Color?
Color of the dropdown border.
final
borderRadius BorderRadiusGeometry?
Border radius of the container.
final
borderSize double
Width of the border.
final
boxShadow List<BoxShadow>?
Box shadow effects.
final
containerDecoration Decoration?
Decoration of the container.
final
containerMargin EdgeInsetsGeometry?
Margin around the container.
final
containerPadding EdgeInsetsGeometry?
Padding inside the container.
final
dropBoxBorderColor Color?
Border color of the dropdown list.
final
dropboxColor Color?
Background color of the dropdown list.
final
dropListModel DropdownSearchListModel<T>
The model representing the dropdown list of options.
final
enable bool
Whether the dropdown is interactive.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Height of the dropdown widget.
final
heightBottomContainer double?
Max height allowed for dropdown overlay.
final
hintText String
Placeholder or hint text when no item is selected.
final
itemSelected OptionItemsSearch<T>?
The currently selected item in the dropdown.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onClear VoidCallback?
Callback triggered when the clear button is pressed.
final
onOptionSelected ValueChanged<OptionItemsSearch<T>>
Callback when an option is selected.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollRadius Radius?
Radius of the scrollbar thumb.
final
scrollThickness double?
Thickness of the scrollbar.
final
scrollThumbColor Color?
Color of the scrollbar thumb.
final
shadowColor Color?
Shadow color of the container.
final
showArrowIcon bool
Whether to show the dropdown arrow icon.
final
showBorder bool
Whether to show a border around the container.
final
showClearButton bool
Whether to show a clear/reset button when an item is selected.
final
textColorItem Color?
Text color for dropdown items.
final
textColorTitle Color?
Text color for the selected item title.
final
width double?
Width of the dropdown widget.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SearchDropList<T>>
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