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
18489fdd
Unverified
Commit
18489fdd
authored
May 14, 2021
by
Abhishek Ghaskata
Committed by
GitHub
May 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Alignment docs for FractionallySizedBox (#82539)
parent
26c693fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+27
-0
No files found.
packages/flutter/lib/src/widgets/basic.dart
View file @
18489fdd
...
...
@@ -2676,6 +2676,33 @@ class UnconstrainedBox extends StatelessWidget {
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=PEsY654EGZ0}
///
/// {@tool dartpad --template=stateless_widget_scaffold}
///
/// This sample shows a [FractionallySizedBox] whose one child is 50% of
/// the box's size per the width and height factor parameters, and centered
/// within that box by the alignment parameter.
///
/// ```dart
/// Widget build(BuildContext context) {
/// return SizedBox.expand(
/// child: FractionallySizedBox(
/// widthFactor: 0.5,
/// heightFactor: 0.5,
/// alignment: FractionalOffset.center,
/// child: DecoratedBox(
/// decoration: BoxDecoration(
/// border: Border.all(
/// color: Colors.blue,
/// width: 4,
/// ),
/// ),
/// ),
/// ),
/// );
/// }
/// ```
/// {@end-tool}
///
/// See also:
///
/// * [Align], which sizes itself based on its child's size and positions
...
...
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