![]() |
VOOZH | about |
The ClipRect widget is used to clips its child using a 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 ClipRRect and is used to Clip a Rectangle portion of the child widget but without the rounded corners
ClipRect ClipRect({
Key? key,
CustomClipper<Rect>? clipper,
Clip clipBehavior = Clip.hardEdge,
Widget? child,
})property | description |
|---|---|
children | The widgets 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 |
clipBehaviour | This property takes Clip Enum as a value and Controls how to clip |
clipper | If non-null, determines which clip to use. |
Example:
Here we will clip the below image in our app:
Refer to this article to Display Network Image in Flutter.
main.dart:
Output:
👁 Image