CustomDropdown<T> class

A highly customizable dropdown widget with search functionality

Inheritance

Constructors

CustomDropdown({Key? key, String? label, T? value, required List<T> items, bool enabled = true, Widget? prefix, Widget? suffix, bool rotateSuffixOnOpen = false, bool rotatePrefixOnOpen = false, double iconRotationAngle = 90.0, String? validator(T?)?, required CustomDropdownConfig config, required Widget itemBuilder(T item), required Widget selectedBuilder(T? item), required ValueChanged<T?> onChanged, bool searchMatcher(T item, String query)?})
const

Properties

config CustomDropdownConfig
Configuration for dropdown appearance and behavior
final
enabled bool
Whether the dropdown is enabled
final
hashCode int
The hash code for this object.
no setterinherited
iconRotationAngle double
Rotation angle in degrees when dropdown is open (default: 180)
final
itemBuilder Widget Function(T item)
Builder for each item in the dropdown list
final
items List<T>
List of items to display in dropdown
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String?
Label displayed above the dropdown
final
onChanged ValueChanged<T?>
Callback when an item is selected
final
prefix Widget?
Icon displayed before the selected value
final
rotatePrefixOnOpen bool
Whether to rotate prefix icon when dropdown opens (default: false)
final
rotateSuffixOnOpen bool
Whether to rotate suffix icon when dropdown opens (default: false)
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchMatcher bool Function(T item, String query)?
Custom search filter function (optional) Return true if item matches the search query
final
selectedBuilder Widget Function(T? item)
Builder for the selected item display
final
suffix Widget?
Icon displayed after the selected value
final
validator String? Function(T?)?
Validator function for form validation
final
value → T?
Currently selected value
final

Methods

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