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
5377182d
Unverified
Commit
5377182d
authored
Mar 28, 2023
by
Michael Goderbauer
Committed by
GitHub
Mar 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Align doc (#123566)
Fix Align doc
parent
762ff6c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+19
-14
No files found.
packages/flutter/lib/src/widgets/basic.dart
View file @
5377182d
...
...
@@ -1982,13 +1982,6 @@ class Padding extends SingleChildRenderObjectWidget {
/// dimension and the size factor. For example if widthFactor is 2.0 then
/// the width of this widget will always be twice its child's width.
///
/// ## How it works
///
/// The [alignment] property describes a point in the `child`'s coordinate system
/// and a different point in the coordinate system of this widget. The [Align]
/// widget positions the `child` such that both points are lined up on top of
/// each other.
///
/// {@tool snippet}
/// The [Align] widget in this example uses one of the defined constants from
/// [Alignment], [Alignment.topRight]. This places the [FlutterLogo] in the top
...
...
@@ -2013,15 +2006,27 @@ class Padding extends SingleChildRenderObjectWidget {
/// ```
/// {@end-tool}
///
/// ## How it works
///
/// The [alignment] property describes a point in the `child`'s coordinate system
/// and a different point in the coordinate system of this widget. The [Align]
/// widget positions the `child` such that both points are lined up on top of
/// each other.
///
/// {@tool snippet}
/// The [Alignment] used in the following example defines
a single point
:
/// The [Alignment] used in the following example defines
two points
:
///
/// * (0.2 * width of [FlutterLogo]/2 + width of [FlutterLogo]/2, 0.6 * height
/// of [FlutterLogo]/2 + height of [FlutterLogo]/2) = (36.0, 48.0).
/// of [FlutterLogo]/2 + height of [FlutterLogo]/2) = (36.0, 48.0) in the
/// coordinate system of the [FlutterLogo].
/// * (0.2 * width of [Align]/2 + width of [Align]/2, 0.6 * height
/// of [Align]/2 + height of [Align]/2) = (72.0, 96.0) in the
/// coordinate system of the [Align] widget (blue area).
///
/// The [Alignment] class uses a coordinate system with an origin in the center
/// of the [Container], as shown with the [Icon] above. [Align] will place the
/// [FlutterLogo] at (36.0, 48.0) according to this coordinate system.
/// The [Align] widget positions the [FlutterLogo] such that the two points are on
/// top of each other. In this example, the top left of the [FlutterLogo] will
/// be placed at (72.0, 96.0) - (36.0, 48.0) = (36.0, 48.0) from the top left of
/// the [Align] widget.
///
/// ![A blue square container with the Flutter logo positioned according to the
/// Alignment specified above. A point is marked at the center of the container
...
...
@@ -2048,9 +2053,9 @@ class Padding extends SingleChildRenderObjectWidget {
/// The [FractionalOffset] used in the following example defines two points:
///
/// * (0.2 * width of [FlutterLogo], 0.6 * height of [FlutterLogo]) = (12.0, 36.0)
/// in the coordinate system of the
blue container
.
/// in the coordinate system of the
[FlutterLogo]
.
/// * (0.2 * width of [Align], 0.6 * height of [Align]) = (24.0, 72.0) in the
/// coordinate system of the [Align] widget.
/// coordinate system of the [Align] widget
(blue area)
.
///
/// The [Align] widget positions the [FlutterLogo] such that the two points are on
/// top of each other. In this example, the top left of the [FlutterLogo] will
...
...
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