AnimatedButton.circular constructor

AnimatedButton.circular({
  1. Key? key,
  2. required Widget child,
  3. required VoidCallback? onPressed,
  4. Color color = Colors.green,
  5. Color? glowColor,
  6. double size = 60.0,
  7. double glowIntensity = 0.8,
  8. Duration? animationDuration,
  9. bool enabled = true,
})

Factory constructor for a circular button similar to the image

Implementation

factory AnimatedButton.circular({
  Key? key,
  required Widget child,
  required VoidCallback? onPressed,
  Color color = Colors.green,
  Color? glowColor,
  double size = 60.0,
  double glowIntensity = 0.8,
  Duration? animationDuration,
  bool enabled = true,
}) {
  return AnimatedButton(
    key: key,
    child: child,
    onPressed: onPressed,
    color: color,
    glowColor: glowColor,
    size: size,
    glowIntensity: glowIntensity,
    animationDuration: animationDuration,
    animationType: ButtonAnimationType.breathingGlow,
    borderRadius: size / 2,
    enabled: enabled,
  );
}