withRoundCorners method
Makes this widget have round corners. You could also specify border
Implementation
Widget withRoundCorners({BoxBorder? border, BorderRadius? borderRadius}) {
Widget clipR = ClipRRect(
borderRadius: borderRadius ?? BorderRadius.zero,
child: this,
);
return border == null
? clipR
: Container(
child: clipR,
decoration:
BoxDecoration(border: border, borderRadius: borderRadius),
);
}