DropDownMenu constructor

const DropDownMenu({
  1. Key? key,
  2. required List<Widget> header,
  3. required List<Widget> menus,
  4. required DropdownController controller,
  5. Widget? divider,
  6. String tag = 'default',
  7. AnimationType animType = AnimationType.topToBottom,
  8. List<AnimationType>? animTypes,
  9. GestureTapCallback? outsideOnTap,
  10. double headerHeight = 48,
  11. Decoration? headerDecoration,
  12. Color headerBackgroundColor = Colors.white,
  13. MainAxisAlignment headerMainAxisAlignment = MainAxisAlignment.spaceAround,
  14. double slideDx = 0.2,
  15. EdgeInsetsGeometry padding = EdgeInsets.zero,
  16. Curve curve = Curves.decelerate,
  17. Duration duration = const Duration(milliseconds: 300),
  18. 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');