BasicDropDownButton constructor
const
BasicDropDownButton({
- required ButtonStyle? buttonStyle,
- required String? buttonText,
- required Widget buttonIcon({
- required bool showedMenu,
- required DropDownButtonPosition position,
- double buttonIconSpace = 0,
- Key? key,
- Color buttonIconColor = Colors.black,
- bool buttonIconFirst = true,
- Widget? buttonChild,
- TextStyle? buttonTextStyle,
- Widget customButton({
- required VoidCallback? showHideMenuEvent,
- required bool showMenu,
Creates a BasicDropDownButton.
Either buttonText or buttonChild must be provided, and either
menuItems
or menuList must be provided.
Implementation
const BasicDropDownButton({
required this.buttonStyle,
required this.buttonText,
required this.menuItems,
required this.menuVerticalSpacing,
required this.menuBackgroundColor,
required this.buttonIcon,
required this.position,
this.buttonIconSpace = 0,
Key? key,
this.buttonIconColor = Colors.black,
this.buttonIconFirst = true,
this.menuItemsSpacing = 0,
this.menuClipBehavior = Clip.hardEdge,
this.menuPadding,
this.buttonChild,
this.menuBorderRadius,
this.buttonTextStyle,
this.customButton,
this.menuList,
this.menuKey,
}) : assert(
!(buttonChild == null && buttonText == null && customButton == null),
'Either provide a [buttonText] or a custom [customButton] or a '
'custom [buttonChild].',
),
assert(
!(menuItems == null && menuList == null),
'Either provide [menuItems] or a custom [menuList].',
),
super(key: key);