rounded method
Implementation
Widget rounded({
double borderRadius = 16.0, // Default border radius
Color? color, // Optional color for the background
BoxFit fit =
BoxFit.cover, // Optional BoxFit to fit image properly in the shape
}) {
return ClipRRect(
borderRadius: BorderRadius.circular(borderRadius),
child: Container(
color: color ??
Colors.transparent, // Use transparent color if not provided
child: this,
),
);
}