cornerRadiusWithClipRRectOnly method

ClipRRect cornerRadiusWithClipRRectOnly({
  1. int bottomLeft = 0,
  2. int bottomRight = 0,
  3. int topLeft = 0,
  4. int topRight = 0,
})

add custom corner radius each side

Implementation

ClipRRect cornerRadiusWithClipRRectOnly({
  int bottomLeft = 0,
  int bottomRight = 0,
  int topLeft = 0,
  int topRight = 0,
}) {
  return ClipRRect(
    borderRadius: BorderRadius.only(
      bottomLeft: Radius.circular(bottomLeft.toDouble()),
      bottomRight: Radius.circular(bottomRight.toDouble()),
      topLeft: Radius.circular(topLeft.toDouble()),
      topRight: Radius.circular(topRight.toDouble()),
    ),
    child: this,
    clipBehavior: Clip.antiAliasWithSaveLayer,
  );
}