From 891bd95e1af48caac1d52103784816dd42330dae Mon Sep 17 00:00:00 2001 From: Yuqian Li Date: Tue, 27 Oct 2020 11:07:04 -0700 Subject: [PATCH] Add clipBehavior to BoxFit doc (#68662) --- packages/flutter/lib/src/painting/box_fit.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/flutter/lib/src/painting/box_fit.dart b/packages/flutter/lib/src/painting/box_fit.dart index 22c5c979b4..a05fef0940 100644 --- a/packages/flutter/lib/src/painting/box_fit.dart +++ b/packages/flutter/lib/src/painting/box_fit.dart @@ -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,