Add clipBehavior to BoxFit doc (#68662)

This commit is contained in:
Yuqian Li
2020-10-27 11:07:04 -07:00
committed by GitHub
parent e9b18c1d9c
commit 891bd95e1a

View File

@@ -29,18 +29,27 @@ enum BoxFit {
/// As small as possible while still covering the entire target box.
///
/// {@template clip_with_box_fit}
/// To actually clip the content, use `clipBehavior: Clip.hardEdge` alongside
/// this in a [FittedBox].
/// {@endtemplate}
///
/// ![](https://flutter.github.io/assets-for-api-docs/assets/painting/box_fit_cover.png)
cover,
/// Make sure the full width of the source is shown, regardless of
/// whether this means the source overflows the target box vertically.
///
/// {@macro clip_with_box_fit}
///
/// ![](https://flutter.github.io/assets-for-api-docs/assets/painting/box_fit_fitWidth.png)
fitWidth,
/// Make sure the full height of the source is shown, regardless of
/// whether this means the source overflows the target box horizontally.
///
/// {@macro clip_with_box_fit}
///
/// ![](https://flutter.github.io/assets-for-api-docs/assets/painting/box_fit_fitHeight.png)
fitHeight,
@@ -49,6 +58,8 @@ enum BoxFit {
///
/// The source image is not resized.
///
/// {@macro clip_with_box_fit}
///
/// ![](https://flutter.github.io/assets-for-api-docs/assets/painting/box_fit_none.png)
none,