roundedRectangle method

Widget roundedRectangle({
  1. Color? color,
  2. double radius = 8.0,
  3. BoxBorder? border,
  4. List<BoxShadow>? boxShadow,
  5. Gradient? gradient,
})

Add rounded rectangle with background color

Implementation

Widget roundedRectangle({
  Color? color,
  double radius = 8.0,
  BoxBorder? border,
  List<BoxShadow>? boxShadow,
  Gradient? gradient,
}) =>
    Container(
      decoration: BoxDecoration(
        color: color,
        borderRadius: BorderRadius.circular(radius),
        border: border,
        boxShadow: boxShadow,
        gradient: gradient,
      ),
      child: this,
    );