![]() |
VOOZH | about |
The ClipRRect widget in flutter is used to clips its child using a rounded rectangle. It associates with the Clippers family. The main use of clippers is to clip out any portion of the widget as required. It behaves similar to that of ClipRect and is used to Clip a Rectangle portion of the child widget but with rounded corners.
ClipRRect ClipRRect({
Key? key,
BorderRadiusGeometry borderRadius = BorderRadius.zero,
CustomClipper<RRect>? clipper,
Clip clipBehavior = Clip.antiAlias,
Widget? child,
})Property | Description |
|---|---|
child | The widget below this widget in the tree |
hashCode | The hash code for this object |
key | Controls how one widget replaces another widget in the tree |
runtimeType | A representation of the runtime type of the object |
clipBehavior | This property takes Clip Enum as a value and Controls how to clip |
clipper | If non-null, determines which clip to use. |
borderRadius | The border radius of the rounded corners |
Example:
Here we will clip the below image with a rounded corner rectangle:
Refer to this article to Display Network Image in Flutter.
main.dart:
Output:
👁 ImageExplanation of the above application