ClipRRect widget in Stac allows you to clip its child using rounded rectangles. This is useful when you want to create UI elements with rounded corners.
Usage
- Dart
- JSON
- Preview
Properties
BorderRadius Format Options
TheborderRadius property can be specified in multiple formats:
Single Value (applies to all corners)
List Format (topLeft, topRight, bottomLeft, bottomRight)
Object Format (specify each corner individually)
Clip Behavior Options
TheclipBehavior property accepts the following values:
"antiAlias"(default): Clip using anti-aliasing for smoother edges"hardEdge": Clip without anti-aliasing for sharper edges"antiAliasWithSaveLayer": Anti-aliased clipping with an offscreen buffer (higher quality but slower)"none": No clipping (not recommended for ClipRRect)