DropdownMenuButton.material constructor
DropdownMenuButton.material({
- Key? key,
- Color? iconColor,
- double iconSize = 24,
- IconData? iconData,
- required DropdownMenuButtonBuilder builder,
- required int itemCount,
- required DropdownMenuButtonIndexBuilder itemBuilder,
- ValueCallback<
int> ? onChanged, - Color? backgroundColor,
- Decoration? decoration,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding = const EdgeInsets.symmetric(horizontal: 4),
Implementation
DropdownMenuButton.material({
super.key,
Color? iconColor,
double iconSize = 24,
IconData? iconData,
required this.builder,
required this.itemCount,
required DropdownMenuButtonIndexBuilder itemBuilder,
this.onChanged,
this.backgroundColor,
this.decoration,
this.margin,
this.padding = const EdgeInsets.symmetric(horizontal: 4),
}) : icon = Icon(iconData ?? Icons.arrow_right_rounded,
color: iconColor, size: iconSize),
itemBuilder = ((int index) =>
itemBuilder(index).paddingSymmetric(vertical: 8, horizontal: 4));