SelectDropList<T> class

A customizable dropdown selection widget.

SelectDropList provides a highly configurable dropdown menu with overlay behavior. It allows for custom styling, scroll behavior, clear/reset option, and optional icons.

Inheritance

Constructors

SelectDropList({Key? key, required OptionItems<T>? itemSelected, required DropdownListModel<T> dropListModel, required dynamic onOptionSelected(OptionItems<T>), required String hintText, VoidCallback? onClear, bool showClearButton = false, bool showIcon = false, bool showArrowIcon = true, Widget? icon, double arrowIconSize = 20, Color? textColorTitle, double textSizeTitle = 16, EdgeInsetsGeometry? paddingDropItem, Color? arrowColor, Color? textColorItem, double textSizeItem = 14, bool showBorder = true, bool enable = true, double? width, BorderRadiusGeometry? borderRadius, double? height, double? heightBottomContainer, List<BoxShadow>? boxShadow, Color? borderColor, Color? hintColorTitle, Decoration? containerDecoration, EdgeInsetsGeometry? containerPadding, Color? shadowColor, IconData? suffixIcon, EdgeInsetsGeometry? containerMargin, double borderSize = 1, BorderRadiusGeometry? dropBoxBorderRadius, Color? dropBoxBorderColor, Color? dropboxColor, Color? scrollThumbColor, double? scrollThickness, Radius? scrollRadius, EdgeInsetsGeometry? padding})
Creates a SelectDropList widget.
const

Properties

arrowColor Color?
Color of the arrow icon.
final
arrowIconSize double
Size of the arrow icon.
final
borderColor Color?
Border color of the dropdown.
final
borderRadius BorderRadiusGeometry?
Border radius of the dropdown container.
final
borderSize double
Width of the container border.
final
boxShadow List<BoxShadow>?
Box shadows to apply to the dropdown container.
final
containerDecoration Decoration?
Custom decoration for the container.
final
containerMargin EdgeInsetsGeometry?
Margin around the dropdown container.
final
containerPadding EdgeInsetsGeometry?
Padding inside the dropdown container.
final
dropBoxBorderColor Color?
Border color of dropdown overlay box.
final
dropBoxBorderRadius BorderRadiusGeometry?
Border radius of the dropdown overlay.
final
dropboxColor Color?
Background color of dropdown overlay.
final
dropListModel DropdownListModel<T>
The list of selectable items.
final
enable bool
Whether the dropdown is interactable.
final
hashCode int
The hash code for this object.
no setterinherited
height double?
Height of the main dropdown button.
final
heightBottomContainer double?
Height of the dropdown overlay container.
final
hintColorTitle Color?
Color of the placeholder/hint text.
final
hintText String
Placeholder text when no option is selected.
final
icon Widget?
Optional leading icon widget.
final
itemSelected OptionItems<T>?
The currently selected item.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onClear VoidCallback?
Called when the clear button is tapped.
final
onOptionSelected → dynamic Function(OptionItems<T>)
Callback when an option is selected.
final
padding EdgeInsetsGeometry?
Padding around dropdown main row.
final
paddingDropItem EdgeInsetsGeometry?
Padding around dropdown list items.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollRadius Radius?
Radius of the scrollbar.
final
scrollThickness double?
Thickness of the scrollbar.
final
scrollThumbColor Color?
Color of the scrollbar thumb.
final
shadowColor Color?
Shadow color for container.
final
showArrowIcon bool
Whether to show the arrow icon for dropdown state.
final
showBorder bool
Whether to show border around dropdown container.
final
showClearButton bool
Whether to show a clear (reset) button.
final
showIcon bool
Whether to display an icon on the left.
final
suffixIcon IconData?
Suffix icon for additional functionality (optional).
final
textColorItem Color?
Color of dropdown list items.
final
textColorTitle Color?
Color of the selected text.
final
textSizeItem double
Font size of dropdown list items.
final
textSizeTitle double
Font size for selected or hint text.
final
width double?
Width of the dropdown button.
final

Methods

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