Add example to ClipOval docs (#157227)

This commit is contained in:
Loïc Sharma
2024-10-22 15:20:00 -07:00
committed by GitHub
parent 18d1afa3e4
commit bfdb366b50

View File

@@ -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.