CustomDropdown class

A customizable dropdown widget that supports optional search functionality.

This widget can be used for single-selection dropdowns, with full control over appearance, behavior, and layout.

Inheritance
Mixed-in types
Available extensions

Constructors

CustomDropdown({required List<DropDownDataModel> items, required ValueChanged<DropDownDataModel> onChanged, ValueChanged<String>? onSearchChanged, Key? key, DropDownDataModel? selectedItem, String? searchHint = 'Search options', String? hint = 'Select an option', bool isSearch = false, bool isNetworkSearch = false, bool isNetworkSearchLoading = false, bool readOnly = false, bool disabled = false, bool isError = false, String? label, String? errorMessage, Color? filledColor, EdgeInsetsGeometry? menuPadding, bool isRequired = false, String? tooltipMessage, Widget? tooltipIcon, Color? tooltipIconColor})
Creates a CustomDropdown widget.
const

Properties

disabled bool
final
errorMessage String?
final
filledColor Color?
Background color of the dropdown button.
final
hashCode int
The hash code for this object.
no setterinherited
hint String?
final
isError bool
Whether the dropdown is in error state.
final
isNetworkSearch bool
Whether to define the search is local or network
final
isNetworkSearchLoading bool
Whether show the loading text for the network tab.
final
isRequired bool
final
isSearch bool
Whether to show the search box above the list.
final
items List<DropDownDataModel>
The list of items to show in the dropdown.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String?
final
Padding inside the dropdown list menu.
final
onChanged ValueChanged<DropDownDataModel>
Callback triggered when an item is selected.
final
onSearchChanged ValueChanged<String>?
Callback triggered when an search start.
final
readOnly bool
Whether the dropdown is in read-only mode.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchHint String?
Hint text to show when no item is selected.
final
selectedItem DropDownDataModel?
The currently selected item.
final
tooltipIcon Widget?
final
tooltipIconColor Color?
final
tooltipMessage String?
final

Methods

animateOnActionTrigger(AnimationInfo animationInfo, {List<Effect>? effects, bool hasBeenTriggered = false}) Widget

Available on Widget, provided by the AnimatedWidgetExtension extension

animateOnPageLoad(AnimationInfo animationInfo, {List<Effect>? effects}) Widget

Available on Widget, provided by the AnimatedWidgetExtension extension

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