AnimatedButton.rectangular constructor

AnimatedButton.rectangular({
  1. Key? key,
  2. required Widget child,
  3. required VoidCallback? onPressed,
  4. Color color = Colors.blue,
  5. Color? glowColor,
  6. double width = 120.0,
  7. double height = 50.0,
  8. double glowIntensity = 0.6,
  9. Duration? animationDuration,
  10. double borderRadius = 12.0,
  11. bool enabled = true,
  12. EdgeInsetsGeometry? padding,
})

Factory constructor for a rectangular button

Implementation

factory AnimatedButton.rectangular({
  Key? key,
  required Widget child,
  required VoidCallback? onPressed,
  Color color = Colors.blue,
  Color? glowColor,
  double width = 120.0,
  double height = 50.0,
  double glowIntensity = 0.6,
  Duration? animationDuration,
  double borderRadius = 12.0,
  bool enabled = true,
  EdgeInsetsGeometry? padding,
}) {
  return AnimatedButton(
    key: key,
    child: child,
    onPressed: onPressed,
    color: color,
    glowColor: glowColor,
    width: width,
    height: height,
    size: 60.0, // Default fallback
    glowIntensity: glowIntensity,
    animationDuration: animationDuration,
    animationType: ButtonAnimationType.glowWithScale,
    borderRadius: borderRadius,
    enabled: enabled,
    padding: padding,
  );
}