Use int for PlaceholderSpan.placeholderCodeUnit (#98971)
This commit is contained in:
parent
c178cf859f
commit
9e7cc970ea
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user