AdaptiveButton constructor
AdaptiveButton({
- required Widget child,
- VoidCallback? onLongPress,
- ValueChanged<
bool> ? onHighlightChanged, - Color? focusColor,
- Color? hoverColor,
- Color? highlightColor,
- Color? splashColor,
- double elevation = 2.0,
- double focusElevation = 4.0,
- double hoverElevation = 4.0,
- double highlightElevation = 8.0,
- double disabledElevation = 0.0,
- EdgeInsetsGeometry padding = EdgeInsets.zero,
- ShapeBorder shape = const RoundedRectangleBorder(),
- Duration animationDuration = kThemeChangeDuration,
- Clip clipBehavior = Clip.none,
- FocusNode? focusNode,
- bool autofocus = false,
- MaterialTapTargetSize? materialTapTargetSize,
- VoidCallback? onPressed,
- Color? color,
- ButtonTextTheme? textTheme,
- Color? buttonColor,
- Color? textColor,
- Color? disabledTextColor,
- Color? disabledColor,
- Brightness? colorBrightness,
- Widget? icon,
- Widget? label,
Implementation
AdaptiveButton({
required this.child,
this.onLongPress,
this.onHighlightChanged,
this.focusColor,
this.hoverColor,
this.highlightColor,
this.splashColor,
this.elevation = 2.0,
this.focusElevation = 4.0,
this.hoverElevation = 4.0,
this.highlightElevation = 8.0,
this.disabledElevation = 0.0,
this.padding = EdgeInsets.zero,
this.shape = const RoundedRectangleBorder(),
this.animationDuration = kThemeChangeDuration,
this.clipBehavior = Clip.none,
this.focusNode,
this.autofocus = false,
this.materialTapTargetSize,
this.onPressed,
this.color,
this.textTheme,
this.buttonColor,
this.textColor,
this.disabledTextColor,
this.disabledColor,
this.colorBrightness,
this.icon,
this.label,
}) : _raised = false,
_icon = false,
borderRadius = null;