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
60deae85
Unverified
Commit
60deae85
authored
Jul 06, 2020
by
Ram Navan
Committed by
GitHub
Jul 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issues/58053 - Set default textBaseline to alphabetic in the Table widget (#60586)
parent
de205ec1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
AUTHORS
AUTHORS
+1
-0
table.dart
packages/flutter/lib/src/widgets/table.dart
+3
-1
table_test.dart
packages/flutter/test/widgets/table_test.dart
+24
-0
No files found.
AUTHORS
View file @
60deae85
...
...
@@ -63,3 +63,4 @@ Brian Wang <xinlei966@gmail.com>
法的空间 <zmtzawqlp@live.com>
CaiJingLong <cjl_spy@163.com>
Alex Li <google@alexv525.com>
Ram Navan <hiramprasad@gmail.com>
packages/flutter/lib/src/widgets/table.dart
View file @
60deae85
...
...
@@ -109,7 +109,7 @@ class Table extends RenderObjectWidget {
this
.
textDirection
,
this
.
border
,
this
.
defaultVerticalAlignment
=
TableCellVerticalAlignment
.
top
,
this
.
textBaseline
,
this
.
textBaseline
=
TextBaseline
.
alphabetic
,
})
:
assert
(
children
!=
null
),
assert
(
defaultColumnWidth
!=
null
),
assert
(
defaultVerticalAlignment
!=
null
),
...
...
@@ -201,6 +201,8 @@ class Table extends RenderObjectWidget {
final
TableCellVerticalAlignment
defaultVerticalAlignment
;
/// The text baseline to use when aligning rows using [TableCellVerticalAlignment.baseline].
///
/// Defaults to [TextBaseline.alphabetic].
final
TextBaseline
textBaseline
;
final
List
<
Decoration
>
_rowDecorations
;
...
...
packages/flutter/test/widgets/table_test.dart
View file @
60deae85
...
...
@@ -932,5 +932,29 @@ void main() {
},
);
testWidgets
(
'Table widget - Default textBaseline is set to TableBaseline.alphabetic'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Table
(
defaultVerticalAlignment:
TableCellVerticalAlignment
.
baseline
,
children:
const
<
TableRow
>[
TableRow
(
children:
<
Widget
>[
Text
(
'Some Text'
),
],
),
],
),
),
);
final
RenderTable
table
=
tester
.
renderObject
(
find
.
byType
(
Table
));
expect
(
table
.
textBaseline
,
TextBaseline
.
alphabetic
);
},
);
// TODO(ianh): Test handling of TableCell object
}
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