ZwapDropDown class
Custom dropdown with a list of values with emoji and text values
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ZwapDropDown
Constructors
-
ZwapDropDown({Key? key, required Widget head, required Map<
String, Widget> items, required dynamic onSelectCallBack(String selectedItem), String? selectedItem, ZwapDropDownDecoration decoration = const ZwapDropDownDecoration(), bool showArrow = true, FutureOr<Map< getMoreItems(String text, int page)?, bool canSearch = false, String? noResultMessage, FocusNode? focusNode, int sortKeys(String a, String b)?, FutureOr<String, Widget> >void> onFocusChange(bool hasFocus)?})
Properties
- canSearch → bool
-
If canSearch is true users will be able to write inside the dropdown and filter items
final
- decoration → ZwapDropDownDecoration
-
final
- focusNode → FocusNode?
-
If provided and can search is true, assigned to text input
final
-
getMoreItems
→ (FutureOr<
Map< Function(String text, int page)?)String, Widget> > -
If provided when scroll controller hits the end will be called to get more items
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- head → Widget
-
final
-
items
→ Map<
String, Widget> -
The items to display inside this dropdown
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- noResultMessage → String?
-
If not null, when there are not items to display a text with this message will printed
final
-
onFocusChange
→ (FutureOr<
void> Function(bool hasFocus)?) -
final
- onSelectCallBack → dynamic Function(String selectedItem)
-
CallBack function on selecting item
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedItem → String?
-
The optional preselected item
final
- showArrow → bool
-
final
- sortKeys → (int Function(String a, String b)?)
-
Used to sort keys and consequently sort widgets
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _ZwapDropDownState -
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}) → 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