Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c26d1de4
Unverified
Commit
c26d1de4
authored
Mar 30, 2023
by
Greg Spencer
Committed by
GitHub
Mar 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the networked image from the example (#123728)
parent
f266cccd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
13 deletions
+17
-13
settings.json
.vscode/settings.json
+4
-1
fitted_box.0.dart
examples/api/lib/widgets/basic/fitted_box.0.dart
+7
-7
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+6
-5
No files found.
.vscode/settings.json
View file @
c26d1de4
...
...
@@ -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
examples/api/lib/widgets/basic/fitted_box.0.dart
View file @
c26d1de4
...
...
@@ -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
(),
),
);
}
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
c26d1de4
...
...
@@ -1701,8 +1701,9 @@ 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}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment