withRoundedCorners method
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,
);
}