BasicDropDownButton class

A basic implementation of a drop-down button that handles internal state and displays the overlay menu.

Inheritance

Constructors

BasicDropDownButton({required ButtonStyle? buttonStyle, required String? buttonText, required List<Widget> menuItems(VoidCallback hideMenu)?, required double menuVerticalSpacing, required Color? menuBackgroundColor, required Widget buttonIcon({required bool showedMenu})?, required DropDownButtonPosition position, double buttonIconSpace = 0, Key? key, Color buttonIconColor = Colors.black, bool buttonIconFirst = true, double menuItemsSpacing = 0, Clip menuClipBehavior = Clip.hardEdge, EdgeInsets? menuPadding, Widget? buttonChild, BorderRadius? menuBorderRadius, TextStyle? buttonTextStyle, Widget customButton({required VoidCallback? showHideMenuEvent, required bool showMenu})?, Widget menuList({required double buttonWidth, required VoidCallback hideMenu})?, Key? menuKey})
Creates a BasicDropDownButton.
const

Properties

buttonChild Widget?
Custom widget for the button. If provided, overrides buttonText.
final
buttonIcon Widget Function({required bool showedMenu})?
Determines whether to show the indicator icon on the main button.
final
buttonIconColor Color
Color for the icon displayed on the main button.
final
buttonIconFirst bool
Alignment for the icon within the main button.
final
buttonIconSpace double
final
buttonStyle ButtonStyle?
Button style for the main button.
final
buttonText String?
Text displayed on the main button.
final
buttonTextStyle TextStyle?
Text style for the main button.
final
customButton Widget Function({required VoidCallback? showHideMenuEvent, required bool showMenu})?
Custom builder for the main button.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
Background color of the drop-down menu.
final
Border radius for the drop-down menu.
final
Clipping behavior for the drop-down menu.
final
Builder function to generate the list of menu item widgets.
final
Spacing between menu items.
final
final
Custom widget for the entire menu list. If provided, overrides menuItems.
final
Padding for the menu items inside the drop-down.
final
Vertical spacing between the main button and the drop-down menu.
final
position DropDownButtonPosition
Position of the drop-down menu relative to the button.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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