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
e9b183d4
Unverified
Commit
e9b183d4
authored
Nov 01, 2020
by
Suryanshu Singh
Committed by
GitHub
Nov 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AdoptAWidget: FittedBox (#69503)
parent
72025f0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+21
-0
No files found.
packages/flutter/lib/src/widgets/basic.dart
View file @
e9b183d4
...
...
@@ -1474,6 +1474,27 @@ class CompositedTransformFollower extends SingleChildRenderObjectWidget {
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=T4Uehk3_wlY}
///
/// {@tool sample --template=stateless_widget_scaffold_center}
///
/// In this example, the image is stretched to fill the entire [Container], which would
/// not happen normally without using FittedBox.
///
/// ```dart
/// Widget build(BuildContext) {
/// return Container(
/// height: 400,
/// width: 300,
/// color: Colors.red,
/// child: FittedBox(
/// child: Image.network('https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg'),
/// fit: BoxFit.fill,
/// ),
/// );
/// }
/// ```
///
/// {@end-tool}
///
/// See also:
///
/// * [Transform], which applies an arbitrary transform to its child widget at
...
...
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