Protected against bots by Yandex SmartCaptcha. Data processing policy
ClipRRect
This page has not been translated into English yet. The Russian original is below.
Обрезает дочерний элемент по скруглённому прямоугольнику. Используется для скругления углов изображений и контейнеров.
Тип:
single-child
ClipRRect
#borderRadius circular 20
Image src:"https://example.com/poster.jpg" fit:cover
Параметры
| Параметр | Тип | Default | Описание |
|---|---|---|---|
clipBehavior
|
string | antiAlias |
Режим обрезки:
none
,
hardEdge
,
antiAlias
,
antiAliasWithSaveLayer
|
Вложенные структуры
#borderRadius
// Одинаковое скругление
#borderRadius circular 20
// Только отдельные углы
#borderRadius only topLeft:20 topRight:20 bottomLeft:0 bottomRight:0
Примеры
Скруглённое изображение
SizedBox width:512 height:288
ClipRRect
#borderRadius circular 20
Image src:"https://example.com/poster.jpg" fit:cover
Карточка со скруглением сверху
ClipRRect
#borderRadius only topLeft:16 topRight:16
Column
Image src:"https://example.com/cover.jpg" fit:cover
Padding
#padding all 12
Text "Описание"
See also
-
DecoratedBox
— скругление через
#borderRadiusв#decoration(без обрезки содержимого)