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
e18c34ab
Unverified
Commit
e18c34ab
authored
Sep 14, 2022
by
Dan Field
Committed by
GitHub
Sep 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix text direction nullability (#111513)
parent
b54b5281
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
text_painter.dart
packages/flutter/lib/src/painting/text_painter.dart
+8
-4
No files found.
packages/flutter/lib/src/painting/text_painter.dart
View file @
e18c34ab
...
@@ -222,11 +222,13 @@ class TextPainter {
...
@@ -222,11 +222,13 @@ class TextPainter {
/// This is a convenience method that creates a text painter with the supplied
/// This is a convenience method that creates a text painter with the supplied
/// parameters, lays it out with the supplied [minWidth] and [maxWidth], and
/// parameters, lays it out with the supplied [minWidth] and [maxWidth], and
/// returns its [TextPainter.width] making sure to dispose the underlying
/// returns its [TextPainter.width] making sure to dispose the underlying
/// resources.
/// resources. Doing this operation is expensive and should be avoided
/// whenever it is possible to preserve the [TextPainter] to paint the
/// text or get other information about it.
static
double
computeWidth
({
static
double
computeWidth
({
required
InlineSpan
text
,
required
InlineSpan
text
,
required
TextDirection
textDirection
,
TextAlign
textAlign
=
TextAlign
.
start
,
TextAlign
textAlign
=
TextAlign
.
start
,
TextDirection
?
textDirection
,
double
textScaleFactor
=
1.0
,
double
textScaleFactor
=
1.0
,
int
?
maxLines
,
int
?
maxLines
,
String
?
ellipsis
,
String
?
ellipsis
,
...
@@ -262,11 +264,13 @@ class TextPainter {
...
@@ -262,11 +264,13 @@ class TextPainter {
/// This is a convenience method that creates a text painter with the supplied
/// This is a convenience method that creates a text painter with the supplied
/// parameters, lays it out with the supplied [minWidth] and [maxWidth], and
/// parameters, lays it out with the supplied [minWidth] and [maxWidth], and
/// returns its [TextPainter.maxIntrinsicWidth] making sure to dispose the
/// returns its [TextPainter.maxIntrinsicWidth] making sure to dispose the
/// underlying resources.
/// underlying resources. Doing this operation is expensive and should be avoided
/// whenever it is possible to preserve the [TextPainter] to paint the
/// text or get other information about it.
static
double
computeMaxIntrinsicWidth
({
static
double
computeMaxIntrinsicWidth
({
required
InlineSpan
text
,
required
InlineSpan
text
,
required
TextDirection
textDirection
,
TextAlign
textAlign
=
TextAlign
.
start
,
TextAlign
textAlign
=
TextAlign
.
start
,
TextDirection
?
textDirection
,
double
textScaleFactor
=
1.0
,
double
textScaleFactor
=
1.0
,
int
?
maxLines
,
int
?
maxLines
,
String
?
ellipsis
,
String
?
ellipsis
,
...
...
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