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
cad08149
Unverified
Commit
cad08149
authored
Feb 12, 2020
by
Gary Qian
Committed by
GitHub
Feb 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove invalid assert for TextHeightBehavior (#50603)
parent
953df281
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
text_painter.dart
packages/flutter/lib/src/painting/text_painter.dart
+0
-1
text_painter_test.dart
packages/flutter/test/painting/text_painter_test.dart
+9
-0
No files found.
packages/flutter/lib/src/painting/text_painter.dart
View file @
cad08149
...
...
@@ -346,7 +346,6 @@ class TextPainter {
ui
.
TextHeightBehavior
get
textHeightBehavior
=>
_textHeightBehavior
;
ui
.
TextHeightBehavior
_textHeightBehavior
;
set
textHeightBehavior
(
ui
.
TextHeightBehavior
value
)
{
assert
(
value
!=
null
);
if
(
_textHeightBehavior
==
value
)
return
;
_textHeightBehavior
=
value
;
...
...
packages/flutter/test/painting/text_painter_test.dart
View file @
cad08149
...
...
@@ -730,6 +730,15 @@ void main() {
expect
(
painter
.
inlinePlaceholderBoxes
[
13
],
const
TextBox
.
fromLTRBD
(
351
,
30
,
401
,
60
,
TextDirection
.
ltr
));
},
skip:
isBrowser
);
// Null values are valid. See https://github.com/flutter/flutter/pull/48346#issuecomment-584839221
test
(
'TextPainter set TextHeightBehavior null test'
,
()
{
final
TextPainter
painter
=
TextPainter
(
textHeightBehavior:
null
)
..
textDirection
=
TextDirection
.
ltr
;
painter
.
textHeightBehavior
=
const
TextHeightBehavior
();
painter
.
textHeightBehavior
=
null
;
});
test
(
'TextPainter line metrics'
,
()
{
final
TextPainter
painter
=
TextPainter
()
..
textDirection
=
TextDirection
.
ltr
;
...
...
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