Skip to content

Commit c26d1de

Browse files
authored
Remove the networked image from the example (#123728)
1 parent f266ccc commit c26d1de

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
"editor.formatOnSave": false,
88
"editor.formatOnType": false,
99

10-
"html.format.enable": false
10+
"html.format.enable": false,
11+
"githubPullRequests.ignoredPullRequestBranches": [
12+
"master"
13+
]
1114
}

examples/api/lib/widgets/basic/fitted_box.0.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
// Flutter code sample for [FittedBox].
6-
75
import 'package:flutter/material.dart';
86

7+
/// Flutter code sample for [FittedBox].
8+
99
void main() => runApp(const FittedBoxApp());
1010

1111
class FittedBoxApp extends StatelessWidget {
@@ -32,12 +32,12 @@ class FittedBoxExample extends StatelessWidget {
3232
return Container(
3333
height: 400,
3434
width: 300,
35-
color: Colors.red,
36-
child: FittedBox(
35+
color: Colors.blue,
36+
child: const FittedBox(
37+
// TRY THIS: Try changing the fit types to see how they change the way
38+
// the placeholder fits into the container.
3739
fit: BoxFit.fill,
38-
child: Image.network(
39-
'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg',
40-
),
40+
child: Placeholder(),
4141
),
4242
);
4343
}

packages/flutter/lib/src/widgets/basic.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,17 +1701,18 @@ class CompositedTransformFollower extends SingleChildRenderObjectWidget {
17011701
/// {@youtube 560 315 https://www.youtube.com/watch?v=T4Uehk3_wlY}
17021702
///
17031703
/// {@tool dartpad}
1704-
/// In this example, the image is stretched to fill the entire [Container], which would
1705-
/// not happen normally without using FittedBox.
1704+
/// In this example, the [Placeholder] is stretched to fill the entire
1705+
/// [Container]. Try changing the fit types to see the effect on the layout of
1706+
/// the [Placeholder].
17061707
///
17071708
/// ** See code in examples/api/lib/widgets/basic/fitted_box.0.dart **
17081709
/// {@end-tool}
17091710
///
17101711
/// See also:
17111712
///
1712-
/// * [Transform], which applies an arbitrary transform to its child widget at
1713-
/// paint time.
1714-
/// * The [catalog of layout widgets](https://flutter.dev/widgets/layout/).
1713+
/// * [Transform], which applies an arbitrary transform to its child widget at
1714+
/// paint time.
1715+
/// * The [catalog of layout widgets](https://flutter.dev/widgets/layout/).
17151716
class FittedBox extends SingleChildRenderObjectWidget {
17161717
/// Creates a widget that scales and positions its child within itself according to [fit].
17171718
///

0 commit comments

Comments
 (0)