DropDownMenu class
A widget that displays a drop-down menu.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DropDownMenu
Constructors
-
DropDownMenu.new({Key? key, required List<
Widget> header, required DropdownController controller, Widget? divider, String tag = 'default', AnimationType animType = AnimationType.topToBottom, List<AnimationType> ? animTypes, GestureTapCallback? outsideOnTap, double headerHeight = 48, Decoration? headerDecoration, Color headerBackgroundColor = Colors.white, MainAxisAlignment headerMainAxisAlignment = MainAxisAlignment.spaceAround, double slideDx = 0.2, EdgeInsetsGeometry padding = EdgeInsets.zero, Curve curve = Curves.decelerate, Duration duration = const Duration(milliseconds: 300), Color outsideColor = const Color(0x80000000)}) -
const
Properties
- animType → AnimationType
-
The animation type to use for the menu. Default usage is AnimationType.topToBottom.
final
-
animTypes
→ List<
AnimationType> ? -
Choose different animation types for each menu based on the menu index. Default usage is AnimationType.topToBottom.
final
- controller → DropdownController
-
The controller to use to control the menu.
final
- curve → Curve
-
The animation curve used by the drop-down menu.
final
- divider → Widget?
-
The widget that separates the header from the menu.
final
- duration → Duration
-
The duration of the drop-down menu animation parameter.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
header
→ List<
Widget> -
Custom widget displayed in the header. Built-in DropDownHeader widget.
final
- headerBackgroundColor → Color
-
The background color of the header.
final
- headerDecoration → Decoration?
-
The decoration of the header.
final
- headerHeight → double
-
The height of the header.
final
- headerMainAxisAlignment → MainAxisAlignment
-
The arrangement of the title widget on the main axis.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
Custom widget displayed in the menu.
final
- outsideColor → Color
-
The color of the outside region when the menu is displayed.
final
- outsideOnTap → GestureTapCallback?
-
The callback that is called when the outside region is tapped.
final
- padding → EdgeInsetsGeometry
-
The amount of space by drop-down menu.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- slideDx → double
-
The amount of space the sliding menu takes when using the AnimationType.rightToLeft animation type.
final
- tag → String
-
The tag of the menu.
Use multiple drop-down menus at the same time and set tags when using the built-in DropDownHeader widget.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< StatefulWidget> -
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