Unverified Commit c26d1de4 authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Remove the networked image from the example (#123728)

parent f266cccd
...@@ -7,5 +7,8 @@ ...@@ -7,5 +7,8 @@
"editor.formatOnSave": false, "editor.formatOnSave": false,
"editor.formatOnType": false, "editor.formatOnType": false,
"html.format.enable": false "html.format.enable": false,
"githubPullRequests.ignoredPullRequestBranches": [
"master"
]
} }
\ No newline at end of file
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// Flutter code sample for [FittedBox].
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Flutter code sample for [FittedBox].
void main() => runApp(const FittedBoxApp()); void main() => runApp(const FittedBoxApp());
class FittedBoxApp extends StatelessWidget { class FittedBoxApp extends StatelessWidget {
...@@ -32,12 +32,12 @@ class FittedBoxExample extends StatelessWidget { ...@@ -32,12 +32,12 @@ class FittedBoxExample extends StatelessWidget {
return Container( return Container(
height: 400, height: 400,
width: 300, width: 300,
color: Colors.red, color: Colors.blue,
child: FittedBox( 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, fit: BoxFit.fill,
child: Image.network( child: Placeholder(),
'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg',
),
), ),
); );
} }
......
...@@ -1701,17 +1701,18 @@ class CompositedTransformFollower extends SingleChildRenderObjectWidget { ...@@ -1701,17 +1701,18 @@ class CompositedTransformFollower extends SingleChildRenderObjectWidget {
/// {@youtube 560 315 https://www.youtube.com/watch?v=T4Uehk3_wlY} /// {@youtube 560 315 https://www.youtube.com/watch?v=T4Uehk3_wlY}
/// ///
/// {@tool dartpad} /// {@tool dartpad}
/// In this example, the image is stretched to fill the entire [Container], which would /// In this example, the [Placeholder] is stretched to fill the entire
/// not happen normally without using FittedBox. /// [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 ** /// ** See code in examples/api/lib/widgets/basic/fitted_box.0.dart **
/// {@end-tool} /// {@end-tool}
/// ///
/// See also: /// See also:
/// ///
/// * [Transform], which applies an arbitrary transform to its child widget at /// * [Transform], which applies an arbitrary transform to its child widget at
/// paint time. /// paint time.
/// * The [catalog of layout widgets](https://flutter.dev/widgets/layout/). /// * The [catalog of layout widgets](https://flutter.dev/widgets/layout/).
class FittedBox extends SingleChildRenderObjectWidget { class FittedBox extends SingleChildRenderObjectWidget {
/// Creates a widget that scales and positions its child within itself according to [fit]. /// Creates a widget that scales and positions its child within itself according to [fit].
/// ///
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment