FlutterAdvancedDropDown<T> class

A widget that allows selecting an object from a list with optional search and add functionality.

This widget creates a dropdown-like selector with customizable appearance and behavior.

Inheritance

Constructors

FlutterAdvancedDropDown.new({Key? key, void onAddTap()?, String label = "", bool addNone = false, void onOpen()?, required Widget builder(T, int), required void onSelect(T?, int)?, required Widget searchBarBuilder(TextEditingController), required Widget titleWidget, required ValueNotifier<bool> isLoadingAll, required ValueNotifier<List<T>> listNotifier, T? selectedValue, required BoxDecoration decoration, required ValueNotifier<bool> isLoadingMore, double hintHight = 50, required Widget fullLoadingWidgetPlaceHolder, required Widget loadMoreWidgetPlaceHolder})
Creates an FlutterAdvancedDropDown widget.
const

Properties

addNone bool
Whether to add a "None" option to the list.
final
builder Widget Function(T, int)
Function to build the appearance of each item in the list.
final
decoration BoxDecoration
The decoration applied to the dropdown container.
final
fullLoadingWidgetPlaceHolder Widget
Widget to display when the full list is loading.
final
hashCode int
The hash code for this object.
no setterinherited
hintHight double
The height of the hint widget.
final
isLoadingAll ValueNotifier<bool>
Notifier to indicate whether the list is currently loading.
final
isLoadingMore ValueNotifier<bool>
Notifier to indicate whether more items are being loaded.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String
The label text displayed above the selector.
final
listNotifier ValueNotifier<List<T>>
Notifier that holds the list of selectable items.
final
loadMoreWidgetPlaceHolder Widget
Widget to display when loading more items.
final
onAddTap → void Function()?
Callback function when the add button is tapped.
final
onOpen → void Function()?
Callback function when the dropdown is opened.
final
onSelect → void Function(T?, int)?
Callback function when an item is selected. It provides the selected item and its index.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchBarBuilder Widget Function(TextEditingController)
Function to build the search bar widget.
final
selectedValue → T?
The currently selected value.
final
titleWidget Widget
Widget to display as the title/hint when no item is selected.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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