Unverified Commit 9e7cc970 authored by Tomasz Gucio's avatar Tomasz Gucio Committed by GitHub

Use int for PlaceholderSpan.placeholderCodeUnit (#98971)

parent c178cf85
...@@ -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.writeCharCode(placeholderCodeUnit);
} }
} }
......
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment