ModularCustomizableDropdown class

A dropdown extension for any widget.

I have provided three factory constructors to help you get started, but you are welcome to assemble your own using the component's constructor.

Pass any widget as the target of this dropdown, and the dropdown will automagically appear below the widget when you click on it!

Inheritance

Constructors

ModularCustomizableDropdown({required ReactMode reactMode, required dynamic onValueSelect(String selectedValue), required List<String> allDropdownValues, required bool barrierDismissible, required DropdownStyle dropdownStyle, required bool collapseOnSelect, void onDropdownVisibilityChange(bool visible)?, CallbackReactParams? callbackReactParams, TapReactParams? tapReactParams, FocusReactParams? focusReactParams, Key? key})
const
ModularCustomizableDropdown.displayOnCallback({required dynamic onValueSelect(String selectedValue), required List<String> allDropdownValues, required Widget targetBuilder(void toggleDropdown(bool toggleState)), required bool collapseOnSelect, bool barrierDismissible = true, DropdownStyle style = const DropdownStyle(invertYAxisAlignmentWhenOverflow: true), Key? key})
Expose a toggle callback in the target builder method.
factory
ModularCustomizableDropdown.displayOnFocus({required dynamic onValueSelect(String selectedValue), required List<String> allDropdownValues, required Widget targetBuilder(FocusNode focusNode, TextEditingController textController), required TextEditingController textController, required FocusNode focusNode, bool setTextToControllerOnSelect = true, bool collapseOnSelect = true, bool barrierDismissible = true, dynamic onDropdownVisible(bool)?, DropdownStyle style = const DropdownStyle(invertYAxisAlignmentWhenOverflow: true), Key? key})
Same as displayOnTap, but also triggers dropdown when the target is in focus
factory
ModularCustomizableDropdown.displayOnTap({required dynamic onValueSelect(String selectedValue), required List<String> allDropdownValues, required Widget target, dynamic onDropdownVisible(bool)?, bool barrierDismissible = true, DropdownStyle style = const DropdownStyle(invertYAxisAlignmentWhenOverflow: true), bool collapseOnSelect = true, Key? key})
Automatically displays the dropdown when the target is clicked
factory

Properties

allDropdownValues List<String>
When the asTextFieldDropdown factory constructor is called, dropdown will allow an additional ability to filter the list based on the textController's value.
final
barrierDismissible bool
Allows user to click outside dropdown to dismiss
final
callbackReactParams CallbackReactParams?
React to callback events.
final
collapseOnSelect bool
Dispose dropdown on value select?
final
final
focusReactParams FocusReactParams?
React to focus.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onDropdownVisibilityChange → void Function(bool visible)?
final
onValueSelect → dynamic Function(String selectedValue)
Action to perform when the value is tapped.
final
reactMode ReactMode
The modes the dropdown should react to
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tapReactParams TapReactParams?
React to only tap events.
final

Methods

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