CustomDropDownButton<T> constructor
const
CustomDropDownButton<T> ({
- required ButtonStyle buttonStyle,
- required String? buttonText,
- required Widget buttonIcon({
- required bool showedMenu,
- Key? key,
- DropDownButtonPosition position = DropDownButtonPosition.bottomCenter,
- bool buttonIconFirst = true,
- TextStyle? buttonTextStyle,
- Widget customButton({
- required VoidCallback? showHideMenuEvent,
- required bool showMenu,
- T? selectedValue,
- Color? buttonIconColor,
- double buttonIconSpace = 0,
- Widget? buttonChild,
Creates a CustomDropDownButton.
The buttonStyle, buttonText, and menuItems parameters are required.
Implementation
const CustomDropDownButton({
required this.buttonStyle,
required this.buttonText,
required this.menuItems,
required this.buttonIcon,
Key? key,
this.menuVerticalSpacing = 8,
this.menuBackgroundColor = Colors.grey,
this.position = DropDownButtonPosition.bottomCenter,
this.buttonIconFirst = true,
this.menuPadding,
this.menuBorderRadius,
this.buttonTextStyle,
this.customButton,
this.selectedValue,
this.buttonIconColor,
this.menuKey,
this.menuItemsSpacing = 0,
this.buttonIconSpace = 0,
this.buttonChild,
}) : assert(
!(buttonText == null && customButton == null && buttonChild == null),
'Either provide a [buttonText] or a custom [customButton]'
' or a custom [buttonChild].',
),
super(key: key);