AnyAnimatedButtonParams.error constructor

AnyAnimatedButtonParams.error({
  1. double? size,
  2. Color backgroundColor = Colors.red,
  3. Color iconColor = Colors.white,
  4. EdgeInsets padding = const EdgeInsets.all(8.0),
  5. 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,
        ),
      ),
    );