AnyAnimatedButtonParams.error constructor
AnyAnimatedButtonParams.error({
- double? size,
- Color backgroundColor = Colors.red,
- Color iconColor = Colors.white,
- EdgeInsets padding = const EdgeInsets.all(8.0),
- Duration duration = const Duration(milliseconds: 300),
Creates default look of error button with customizable colors and sizes.
Implementation
factory AnyAnimatedButtonParams.error({
double? size,
Color backgroundColor = Colors.red,
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.close,
color: iconColor,
),
),
);