Use int for PlaceholderSpan.placeholderCodeUnit (#98971)

This commit is contained in:
Tomasz Gucio 2022-02-23 23:59:06 +01:00 committed by GitHub
parent c178cf859f
commit 9e7cc970ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ abstract class PlaceholderSpan extends InlineSpan {
}) : super(style: style);
/// 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.
///
@ -60,7 +60,7 @@ abstract class PlaceholderSpan extends InlineSpan {
@override
void computeToPlainText(StringBuffer buffer, {bool includeSemanticsLabels = true, bool includePlaceholders = true}) {
if (includePlaceholders) {
buffer.write(placeholderCodeUnit);
buffer.writeCharCode(placeholderCodeUnit);
}
}

View File

@ -140,7 +140,7 @@ class WidgetSpan extends PlaceholderSpan {
@override
int? codeUnitAtVisitor(int index, Accumulator offset) {
offset.increment(1);
return PlaceholderSpan.placeholderCodeUnit.codeUnitAt(0);
return PlaceholderSpan.placeholderCodeUnit;
}
@override