withRoundedCorners method

Widget withRoundedCorners({
  1. double radius = 8.0,
  2. Color? color,
})

Converts the widget into a rounded container

Implementation

Widget withRoundedCorners({
  double radius = 8.0,
  Color? color,
}) {
  return ClipRRect(
    borderRadius: BorderRadius.circular(radius),
    child: color != null
        ? Container(
      color: color,
      child: this,
    )
        : this,
  );
}