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
9e7cc970
Unverified
Commit
9e7cc970
authored
Feb 23, 2022
by
Tomasz Gucio
Committed by
GitHub
Feb 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use int for PlaceholderSpan.placeholderCodeUnit (#98971)
parent
c178cf85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
placeholder_span.dart
packages/flutter/lib/src/painting/placeholder_span.dart
+2
-2
widget_span.dart
packages/flutter/lib/src/widgets/widget_span.dart
+1
-1
No files found.
packages/flutter/lib/src/painting/placeholder_span.dart
View file @
9e7cc970
...
@@ -42,7 +42,7 @@ abstract class PlaceholderSpan extends InlineSpan {
...
@@ -42,7 +42,7 @@ abstract class PlaceholderSpan extends InlineSpan {
})
:
super
(
style:
style
);
})
:
super
(
style:
style
);
/// The unicode character to represent a placeholder.
/// The unicode character to represent a placeholder.
static
const
String
placeholderCodeUnit
=
'
\
uFFFC'
;
static
const
int
placeholderCodeUnit
=
0xFFFC
;
/// How the placeholder aligns vertically with the text.
/// How the placeholder aligns vertically with the text.
///
///
...
@@ -60,7 +60,7 @@ abstract class PlaceholderSpan extends InlineSpan {
...
@@ -60,7 +60,7 @@ abstract class PlaceholderSpan extends InlineSpan {
@override
@override
void
computeToPlainText
(
StringBuffer
buffer
,
{
bool
includeSemanticsLabels
=
true
,
bool
includePlaceholders
=
true
})
{
void
computeToPlainText
(
StringBuffer
buffer
,
{
bool
includeSemanticsLabels
=
true
,
bool
includePlaceholders
=
true
})
{
if
(
includePlaceholders
)
{
if
(
includePlaceholders
)
{
buffer
.
write
(
placeholderCodeUnit
);
buffer
.
write
CharCode
(
placeholderCodeUnit
);
}
}
}
}
...
...
packages/flutter/lib/src/widgets/widget_span.dart
View file @
9e7cc970
...
@@ -140,7 +140,7 @@ class WidgetSpan extends PlaceholderSpan {
...
@@ -140,7 +140,7 @@ class WidgetSpan extends PlaceholderSpan {
@override
@override
int
?
codeUnitAtVisitor
(
int
index
,
Accumulator
offset
)
{
int
?
codeUnitAtVisitor
(
int
index
,
Accumulator
offset
)
{
offset
.
increment
(
1
);
offset
.
increment
(
1
);
return
PlaceholderSpan
.
placeholderCodeUnit
.
codeUnitAt
(
0
)
;
return
PlaceholderSpan
.
placeholderCodeUnit
;
}
}
@override
@override
...
...
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