AnyAnimatedButtonParams.success constructor
AnyAnimatedButtonParams.success({
- double? size,
- Color backgroundColor = Colors.green,
- Color iconColor = Colors.white,
- EdgeInsets padding = const EdgeInsets.all(8.0),
- Duration duration = const Duration(milliseconds: 300),
Creates default look of success button with customizable colors and sizes.
Implementation
factory AnyAnimatedButtonParams.success({
double? size,
Color backgroundColor = Colors.green,
Color iconColor = Colors.white,
EdgeInsets padding = const EdgeInsets.all(8.0),
Duration duration = const Duration(milliseconds: 300),
}) =>
AnyAnimatedButtonParams(
width: size ?? _size,
height: size ?? _size,
duration: duration,
decoration: BoxDecoration(
borderRadius: _borderRadius,
color: backgroundColor,
),
child: Padding(
padding: padding,
child: Icon(
Icons.check,
color: iconColor,
),
),
);