diff --git a/.vscode/settings.json b/.vscode/settings.json index 6613273525a..f5aad5c6d14 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,8 @@ "editor.formatOnSave": false, "editor.formatOnType": false, - "html.format.enable": false + "html.format.enable": false, + "githubPullRequests.ignoredPullRequestBranches": [ + "master" + ] } \ No newline at end of file diff --git a/examples/api/lib/widgets/basic/fitted_box.0.dart b/examples/api/lib/widgets/basic/fitted_box.0.dart index 062602b0bd9..364de3a988d 100644 --- a/examples/api/lib/widgets/basic/fitted_box.0.dart +++ b/examples/api/lib/widgets/basic/fitted_box.0.dart @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flutter code sample for [FittedBox]. - import 'package:flutter/material.dart'; +/// Flutter code sample for [FittedBox]. + void main() => runApp(const FittedBoxApp()); class FittedBoxApp extends StatelessWidget { @@ -32,12 +32,12 @@ class FittedBoxExample extends StatelessWidget { return Container( height: 400, width: 300, - color: Colors.red, - child: FittedBox( + color: Colors.blue, + child: const FittedBox( + // TRY THIS: Try changing the fit types to see how they change the way + // the placeholder fits into the container. fit: BoxFit.fill, - child: Image.network( - 'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg', - ), + child: Placeholder(), ), ); } diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 4589a00b324..ebd95aa8599 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -1701,17 +1701,18 @@ class CompositedTransformFollower extends SingleChildRenderObjectWidget { /// {@youtube 560 315 https://www.youtube.com/watch?v=T4Uehk3_wlY} /// /// {@tool dartpad} -/// In this example, the image is stretched to fill the entire [Container], which would -/// not happen normally without using FittedBox. +/// In this example, the [Placeholder] is stretched to fill the entire +/// [Container]. Try changing the fit types to see the effect on the layout of +/// the [Placeholder]. /// /// ** See code in examples/api/lib/widgets/basic/fitted_box.0.dart ** /// {@end-tool} /// /// See also: /// -/// * [Transform], which applies an arbitrary transform to its child widget at -/// paint time. -/// * The [catalog of layout widgets](https://flutter.dev/widgets/layout/). +/// * [Transform], which applies an arbitrary transform to its child widget at +/// paint time. +/// * The [catalog of layout widgets](https://flutter.dev/widgets/layout/). class FittedBox extends SingleChildRenderObjectWidget { /// Creates a widget that scales and positions its child within itself according to [fit]. ///