DropDownMenu constructor
const
DropDownMenu({
- 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),
Implementation
const DropDownMenu({
super.key,
required this.header,
required this.menus,
required this.controller,
this.divider,
this.tag = 'default',
this.animType = AnimationType.topToBottom,
this.animTypes,
this.outsideOnTap,
this.headerHeight = 48,
this.headerDecoration,
this.headerBackgroundColor = Colors.white,
this.headerMainAxisAlignment = MainAxisAlignment.spaceAround,
this.slideDx = 0.2,
this.padding = EdgeInsets.zero,
this.curve = Curves.decelerate,
this.duration = const Duration(milliseconds: 300),
this.outsideColor = const Color(0x80000000),
}) : assert(header.length == menus.length,
'The length of the header must be the same as the length of the menus');