Button constructor
Button({
- Key? key,
- required VoidCallback? onPressed,
- VoidCallback? onLongPress,
- ValueChanged<
bool> ? onHover, - ValueChanged<
bool> ? onFocusChange, - ButtonStyle? style,
- FocusNode? focusNode,
- bool autofocus = false,
- Clip? clipBehavior = Clip.none,
- MaterialStatesController? statesController,
- ButtonType? type,
- bool square = false,
- double? radius = 15,
- Size? fixedSize,
- BorderSide? side,
- TextStyle? textStyle,
- Color? backgroundColor,
- Color? foregroundColor,
- Color? overlayColor,
- Color? shadowColor,
- Color? surfaceTintColor,
- double? elevation,
- EdgeInsetsGeometry? padding,
- Size? minimumSize,
- Size? maximumSize,
- OutlinedBorder? shape,
- MouseCursor? mouseCursor,
- VisualDensity? visualDensity,
- MaterialTapTargetSize? tapTargetSize,
- Duration? animationDuration,
- bool? enableFeedback,
- AlignmentGeometry? alignment,
- InteractiveInkFeatureFactory? splashFactory,
- required Widget? child,
Implementation
Button({
super.key,
required super.onPressed,
super.onLongPress,
super.onHover,
super.onFocusChange,
super.style,
super.focusNode,
super.autofocus = false,
super.clipBehavior = Clip.none,
super.statesController,
this.type,
/// Style
this.square = false,
this.radius = 15,
this.fixedSize,
this.side,
this.textStyle,
this.backgroundColor,
this.foregroundColor,
this.overlayColor,
this.shadowColor,
this.surfaceTintColor,
this.elevation,
this.padding,
this.minimumSize,
this.maximumSize,
this.shape,
this.mouseCursor,
this.visualDensity,
this.tapTargetSize,
this.animationDuration,
this.enableFeedback,
this.alignment,
this.splashFactory,
/// end Style
required super.child,
});