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
3ce06efd
Unverified
Commit
3ce06efd
authored
Jul 15, 2020
by
Todd Volkert
Committed by
GitHub
Jul 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default textBaseline to alphabetic in Flex (#61425)
parent
f25bd9c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+4
-2
debug_test.dart
packages/flutter/test/widgets/debug_test.dart
+2
-2
No files found.
packages/flutter/lib/src/widgets/basic.dart
View file @
3ce06efd
...
...
@@ -3871,7 +3871,7 @@ class Flex extends MultiChildRenderObjectWidget {
this
.
crossAxisAlignment
=
CrossAxisAlignment
.
center
,
this
.
textDirection
,
this
.
verticalDirection
=
VerticalDirection
.
down
,
this
.
textBaseline
,
this
.
textBaseline
=
TextBaseline
.
alphabetic
,
this
.
clipBehavior
=
Clip
.
hardEdge
,
List
<
Widget
>
children
=
const
<
Widget
>[],
})
:
assert
(
direction
!=
null
),
...
...
@@ -3963,6 +3963,8 @@ class Flex extends MultiChildRenderObjectWidget {
final
VerticalDirection
verticalDirection
;
/// If aligning items according to their baseline, which baseline to use.
///
/// Defaults to [TextBaseline.alphabetic].
final
TextBaseline
textBaseline
;
// TODO(liyuqian): defaults to [Clip.none] once Google references are updated.
...
...
@@ -4219,7 +4221,7 @@ class Row extends Flex {
CrossAxisAlignment
crossAxisAlignment
=
CrossAxisAlignment
.
center
,
TextDirection
textDirection
,
VerticalDirection
verticalDirection
=
VerticalDirection
.
down
,
TextBaseline
textBaseline
,
TextBaseline
textBaseline
=
TextBaseline
.
alphabetic
,
List
<
Widget
>
children
=
const
<
Widget
>[],
})
:
super
(
children:
children
,
...
...
packages/flutter/test/widgets/debug_test.dart
View file @
3ce06efd
...
...
@@ -34,8 +34,8 @@ void main() {
' If multiple keyed nodes exist as children of another node, they
\n
'
' must have unique keys.
\n
'
' Flex(direction: vertical, mainAxisAlignment: start,
\n
'
' crossAxisAlignment: center
) has multiple children with key
\n
'
" [<'key'>].
\n
"
,
' crossAxisAlignment: center
, textBaseline: alphabetic) has
\n
'
"
multiple children with key
[<'key'>].
\n
"
,
),
);
}
...
...
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