AnimatedStateButton constructor

const AnimatedStateButton({
  1. Key? key,
  2. double? width,
  3. required AnimatedStateButtonController controller,
  4. Future<void> onClick()?,
  5. @Deprecated('Usa onClick en su lugar') Future<void> onPressed()?,
  6. Widget? initChild,
  7. Color initColor = Colors.black,
  8. double borderRadius = 8,
  9. EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 24.0, vertical: 16),
  10. double height = 48,
  11. double compactSize = 48,
  12. Duration animationDuration = const Duration(milliseconds: 400),
  13. Curve animationCurve = Curves.easeInOut,
  14. Duration switchDuration = const Duration(milliseconds: 300),
  15. Curve switchInCurve = Curves.easeOut,
  16. Curve switchOutCurve = Curves.easeIn,
  17. ButtonStyle? buttonStyle,
  18. bool enabled = true,
  19. double? elevation,
  20. Color? shadowColor,
  21. double hoverScale = .02,
  22. double pressScale = .04,
})

Implementation

const AnimatedStateButton({
  super.key,
  this.width,
  required this.controller,
  this.onClick,
  @Deprecated('Usa onClick en su lugar') this.onPressed,
  this.initChild,
  this.initColor = Colors.black,
  this.borderRadius = 8,
  this.padding = const EdgeInsets.symmetric(horizontal: 24.0, vertical: 16),
  this.height = 48,
  this.compactSize = 48,
  this.animationDuration = const Duration(milliseconds: 400),
  this.animationCurve = Curves.easeInOut,
  this.switchDuration = const Duration(milliseconds: 300),
  this.switchInCurve = Curves.easeOut,
  this.switchOutCurve = Curves.easeIn,
  this.buttonStyle,
  this.enabled = true,
  this.elevation,
  this.shadowColor,
  this.hoverScale = .02,
  this.pressScale = .04,
}) : _ownController = false;