ZeroDropdownMenu<T> class

ZeroDropdownMenu is built on top of DropdownButtonFormField2 and ZeroTextField This uses decoration taken from InputDecorationType.

Inheritance

Constructors

ZeroDropdownMenu.new({Key? key, required dynamic onSelected(T?)?, List<T>? items, InputDecorationType? inputDecorationType, ZeroTextfieldSize textfieldSize = ZeroTextfieldSize.small, List<T> selectedItems = const [], String? labelText, String? helperText, String? hintText, String? errorText, TextStyle? labelStyle, TextStyle? errorStyle, TextStyle? helperStyle, Widget? leadingIcon, Widget? trailingIcon, double? menuHeight, double? width, bool? enabled, FocusNode? focusNode, T? value, bool? alignedDropdown = true, TextEditingController? controller, bool enableFilter = true, bool enableSearch = true, List<ZeroDropdownMenuEntry<T>>? entries, ZeroMenuStyle? menuStyle})

Properties

alignedDropdown bool?
If false, the width of the dropdown will be larger than the dropdown button
final
controller TextEditingController?
If null, this widget will create its own TextEditingController.
final
enabled bool?
final
enableFilter bool
final
enableSearch bool
final
entries List<ZeroDropdownMenuEntry<T>>?
List containing only all the ZeroDropdownMenuEntry
final
errorStyle TextStyle?
final
errorText String?
final
focusNode FocusNode?
final
hashCode int
The hash code for this object.
no setterinherited
helperStyle TextStyle?
final
helperText String?
final
hintText String?
final
inputDecorationType InputDecorationType?
Types that are also used on ZeroTextField to provide default styling parameters based on the selected type: ZeroTextField.outline, ZeroTextField.rounded, ZeroTextField.filled, or ZeroTextField.underline
final
items List<T>?
List containing only all the values, not the ZeroDropdownMenuItem
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelStyle TextStyle?
final
labelText String?
final
leadingIcon Widget?
Icon placed before the label
final
ZeroDropdownMenuItem's height, the default value is as per set on ZeroTextfieldSize.small height
final
The ZeroMenuStyle that defines the visual attributes of the menu.
final
onSelected → dynamic Function(T?)?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedItems List<T>
List containing only the selected values, not the ZeroDropdownMenuItem
final
textfieldSize ZeroTextfieldSize
Default value: ZeroTextfieldSize.small
final
trailingIcon Widget?
If set, this will override suffixIcon that is defined in InputDecoration
final
value → T?
The value of the last selected item. If enableMultipleItems is true, then the value would be the last selectedItems element
final
width double?
ZeroDropdownMenuItem's width, the default value is equal to the screen's width
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