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);
|
}) : 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 {
|
|||||||
@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 {
|
|||||||
@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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user