AnimatedStateButton constructor
const
AnimatedStateButton({
- Key? key,
- double? width,
- required AnimatedStateButtonController controller,
- Future<
void> onClick()?, - @Deprecated('Usa onClick en su lugar') Future<
void> onPressed()?, - Widget? initChild,
- Color initColor = Colors.black,
- double borderRadius = 8,
- EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 24.0, vertical: 16),
- double height = 48,
- double compactSize = 48,
- Duration animationDuration = const Duration(milliseconds: 400),
- Curve animationCurve = Curves.easeInOut,
- Duration switchDuration = const Duration(milliseconds: 300),
- Curve switchInCurve = Curves.easeOut,
- Curve switchOutCurve = Curves.easeIn,
- ButtonStyle? buttonStyle,
- bool enabled = true,
- double? elevation,
- Color? shadowColor,
- double hoverScale = .02,
- 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;