AnimButton constructor

const AnimButton({
  1. Key? key,
  2. String? label,
  3. Widget? child,
  4. double? height = 45.0,
  5. double? width = 100.0,
  6. double borderRadius = 8.0,
  7. required VoidCallback onPressed,
  8. Color buttonColor = Colors.lightBlueAccent,
  9. Gradient? gradient,
  10. Curve animationCurve = Curves.easeInOut,
  11. TextAlign? alignment = TextAlign.center,
  12. TextStyle textStyle = const TextStyle(color: Colors.white, fontSize: 15.0, letterSpacing: 1.0),
  13. double animationBegin = 1.0,
  14. double animationEnd = 0.75,
  15. Duration duration = const Duration(milliseconds: 150),
  16. EdgeInsetsGeometry? padding,
  17. EdgeInsetsGeometry? margin,
  18. List<BoxShadow>? boxShadow,
})

Creates an AnimButton.

Implementation

const AnimButton({
  super.key,
  this.label,
  this.child,
  this.height = 45.0,
  this.width = 100.0,
  this.borderRadius = 8.0,
  required this.onPressed,
  this.buttonColor = Colors.lightBlueAccent,
  this.gradient,
  this.animationCurve = Curves.easeInOut,
  this.alignment = TextAlign.center,
  this.textStyle = const TextStyle(
    color: Colors.white,
    fontSize: 15.0,
    letterSpacing: 1.0,
  ),
  this.animationBegin = 1.0,
  this.animationEnd = 0.75,
  this.duration = const Duration(milliseconds: 150),
  this.padding,
  this.margin,
  this.boxShadow,
}) : assert(label != null || child != null, 'Either label or child must be provided.');