ClipRectWidgetExtensions extension
Extension methods for Widget that provide convenient clipping functionality.
This extension adds methods to easily apply various clipping shapes to any widget, including rounded rectangles, circles, and ovals. All methods return new clipped widgets without modifying the original widget.
Example usage:
Container(
width: 100,
height: 100,
color: Colors.blue,
).clipCircular(20); // Creates a rounded rectangle with 20px radius
- on
Methods
-
clipCircle(
{CustomClipper< Rect> ? clipper, Clip clipBehavior = Clip.antiAlias}) → ClipOval -
Available on Widget, provided by the ClipRectWidgetExtensions extension
Clips the widget to a circular shape. -
clipCircular(
[double radius = 12, Clip clipBehavior = Clip.antiAlias]) → ClipRRect -
Available on Widget, provided by the ClipRectWidgetExtensions extension
Clips the widget to a circular rounded rectangle shape. -
clipOval(
{CustomClipper< Rect> ? clipper, Clip clipBehavior = Clip.antiAlias}) → ClipOval -
Available on Widget, provided by the ClipRectWidgetExtensions extension
Clips the widget to an oval shape. -
clipRRect(
{BorderRadiusGeometry borderRadius = BorderRadius.zero, CustomClipper< RRect> ? clipper, Clip clipBehavior = Clip.antiAlias}) → ClipRRect -
Available on Widget, provided by the ClipRectWidgetExtensions extension
Clips the widget to a rounded rectangle shape.