Button constructor
const
Button({
- Key? key,
- Widget? body,
- Widget? trailing,
- Widget? leading,
- String? tooltip,
- ButtonThemeData? theme,
- EdgeInsets? leadingPadding,
- EdgeInsets? padding,
- EdgeInsets? bodyPadding,
- EdgeInsets? trailingPadding,
- bool? active,
- VoidCallback? onLongPress,
- FocusNode? focusNode,
- bool canRequestFocus = true,
- bool autofocus = false,
- bool filled = false,
- required VoidCallback? onPressed,
- bool willChangeState = false,
- bool enableAnimation = true,
Creates a Button.
Implementation
const Button({
super.key,
this.body,
this.trailing,
this.leading,
this.tooltip,
this.theme,
this.leadingPadding,
this.padding,
this.bodyPadding,
this.trailingPadding,
this.active,
this.onLongPress,
this.focusNode,
this.canRequestFocus = true,
this.autofocus = false,
this.filled = false,
required this.onPressed,
this.willChangeState = false,
this.enableAnimation = true,
}) : assert(body != null || trailing != null || leading != null);