ContextMenuButton<T>.dropdown constructor
ContextMenuButton<T>.dropdown (
- Widget body, {
- Key? key,
- String? tooltip,
- EdgeInsets? padding,
- FocusNode? focusNode,
- bool canRequestFocus = true,
- bool autofocus = false,
- bool willChangeState = false,
- VoidCallback? onLongPress,
- ButtonThemeData? theme,
- T? value,
- ContextMenuCanceled? onCanceled,
- required ContextMenuItemSelected<
T> ? onSelected, - required ContextMenuItemBuilder<
T> itemBuilder,
Creates a dropdown button. The difference with a regular DropdownButton, is that a widget will be used alongside the icon instead of the context menu value.
Implementation
factory ContextMenuButton.dropdown(
Widget body, {
Key? key,
String? tooltip,
EdgeInsets? padding,
FocusNode? focusNode,
bool canRequestFocus = true,
bool autofocus = false,
bool willChangeState = false,
VoidCallback? onLongPress,
ButtonThemeData? theme,
T? value,
ContextMenuCanceled? onCanceled,
required ContextMenuItemSelected<T>? onSelected,
required ContextMenuItemBuilder<T> itemBuilder,
}) {
return _ContextMenuButtonDropdown(
key: key,
padding: padding,
bodyPadding: padding != null ? EdgeInsets.zero : null,
theme: theme,
tooltip: tooltip,
onLongPress: onLongPress,
focusNode: focusNode,
canRequestFocus: canRequestFocus,
autofocus: autofocus,
willChangeState: willChangeState,
enableAnimation: true,
value: value,
itemBuilder: itemBuilder,
onCanceled: onCanceled,
onSelected: onSelected,
body: body,
);
}