From bfdb366b50b345199c40b68cd9caa20e1ede0f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Sharma?= <737941+loic-sharma@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:20:00 -0700 Subject: [PATCH] Add example to ClipOval docs (#157227) --- packages/flutter/lib/src/widgets/basic.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 3eb41334e54..5b37a78bcd9 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -925,6 +925,17 @@ class ClipRRect extends SingleChildRenderObjectWidget { /// prevents its child from painting outside that oval, but the size and /// location of the clip oval can be customized using a custom [clipper]. /// +/// {@tool snippet} +/// +/// This example clips an image of a cat using an oval. +/// +/// ```dart +/// ClipOval( +/// child: Image.asset('images/cat.png'), +/// ) +/// ``` +/// {@end-tool} +/// /// See also: /// /// * [CustomClipper], for information about creating custom clips.