LegacyFlatButton constructor
const
LegacyFlatButton({
- Key? key,
- required VoidCallback? onPressed,
- VoidCallback? onLongPress,
- ValueChanged<
bool> ? onHighlightChanged, - MouseCursor? mouseCursor,
- ButtonTextTheme? textTheme,
- Color? textColor,
- Color? disabledTextColor,
- Color? color,
- Color? disabledColor,
- Color? focusColor,
- Color? hoverColor,
- Color? highlightColor,
- Color? splashColor,
- Brightness? colorBrightness,
- EdgeInsetsGeometry? padding,
- VisualDensity? visualDensity,
- ShapeBorder? shape,
- Clip clipBehavior = Clip.none,
- FocusNode? focusNode,
- bool autofocus = false,
- MaterialTapTargetSize? materialTapTargetSize,
- required Widget child,
- double? height,
- double? minWidth,
Create a simple text button.
The autofocus
and clipBehavior
arguments must not be null.
Implementation
const LegacyFlatButton({
Key? key,
required VoidCallback? onPressed,
VoidCallback? onLongPress,
ValueChanged<bool>? onHighlightChanged,
MouseCursor? mouseCursor,
ButtonTextTheme? textTheme,
Color? textColor,
Color? disabledTextColor,
Color? color,
Color? disabledColor,
Color? focusColor,
Color? hoverColor,
Color? highlightColor,
Color? splashColor,
Brightness? colorBrightness,
EdgeInsetsGeometry? padding,
VisualDensity? visualDensity,
ShapeBorder? shape,
Clip clipBehavior = Clip.none,
FocusNode? focusNode,
bool autofocus = false,
MaterialTapTargetSize? materialTapTargetSize,
required Widget child,
double? height,
double? minWidth,
}) : assert(clipBehavior != null),
assert(autofocus != null),
super(
key: key,
height: height,
minWidth: minWidth,
onPressed: onPressed,
onLongPress: onLongPress,
onHighlightChanged: onHighlightChanged,
mouseCursor: mouseCursor,
textTheme: textTheme,
textColor: textColor,
disabledTextColor: disabledTextColor,
color: color,
disabledColor: disabledColor,
focusColor: focusColor,
hoverColor: hoverColor,
highlightColor: highlightColor,
splashColor: splashColor,
colorBrightness: colorBrightness,
padding: padding,
visualDensity: visualDensity,
shape: shape,
clipBehavior: clipBehavior,
focusNode: focusNode,
autofocus: autofocus,
materialTapTargetSize: materialTapTargetSize,
child: child,
);