Remove the networked image from the example (#123728)

This commit is contained in:
Greg Spencer 2023-03-29 18:58:25 -07:00 committed by GitHub
parent f266cccdea
commit c26d1de4a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 13 deletions

View File

@ -7,5 +7,8 @@
"editor.formatOnSave": false,
"editor.formatOnType": false,
"html.format.enable": false
"html.format.enable": false,
"githubPullRequests.ignoredPullRequestBranches": [
"master"
]
}

View File

@ -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(),
),
);
}

View File

@ -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].
///