mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Add example to ClipOval docs (#157227)
This commit is contained in:
parent
18d1afa3e4
commit
bfdb366b50
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user