AdaptiveButton constructor

AdaptiveButton({
  1. required Widget child,
  2. VoidCallback? onLongPress,
  3. ValueChanged<bool>? onHighlightChanged,
  4. Color? focusColor,
  5. Color? hoverColor,
  6. Color? highlightColor,
  7. Color? splashColor,
  8. double elevation = 2.0,
  9. double focusElevation = 4.0,
  10. double hoverElevation = 4.0,
  11. double highlightElevation = 8.0,
  12. double disabledElevation = 0.0,
  13. EdgeInsetsGeometry padding = EdgeInsets.zero,
  14. ShapeBorder shape = const RoundedRectangleBorder(),
  15. Duration animationDuration = kThemeChangeDuration,
  16. Clip clipBehavior = Clip.none,
  17. FocusNode? focusNode,
  18. bool autofocus = false,
  19. MaterialTapTargetSize? materialTapTargetSize,
  20. VoidCallback? onPressed,
  21. Color? color,
  22. ButtonTextTheme? textTheme,
  23. Color? buttonColor,
  24. Color? textColor,
  25. Color? disabledTextColor,
  26. Color? disabledColor,
  27. Brightness? colorBrightness,
  28. Widget? icon,
  29. 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;