AnimButton constructor
const
AnimButton({
- Key? key,
- String? label,
- Widget? child,
- double? height = 45.0,
- double? width = 100.0,
- double borderRadius = 8.0,
- required VoidCallback onPressed,
- Color buttonColor = Colors.lightBlueAccent,
- Gradient? gradient,
- Curve animationCurve = Curves.easeInOut,
- TextAlign? alignment = TextAlign.center,
- TextStyle textStyle = const TextStyle(color: Colors.white, fontSize: 15.0, letterSpacing: 1.0),
- double animationBegin = 1.0,
- double animationEnd = 0.75,
- Duration duration = const Duration(milliseconds: 150),
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- 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.');