diff --git a/packages/flutter/lib/src/painting/placeholder_span.dart b/packages/flutter/lib/src/painting/placeholder_span.dart index 628a374102f..1235fb92a80 100644 --- a/packages/flutter/lib/src/painting/placeholder_span.dart +++ b/packages/flutter/lib/src/painting/placeholder_span.dart @@ -72,20 +72,6 @@ abstract class PlaceholderSpan extends InlineSpan { collector.add(InlineSpanSemanticsInformation.placeholder); } - /// Populates the `semanticsOffsets` and `semanticsElements` with the appropriate data - /// to be able to construct a [SemanticsNode]. - /// - /// [PlaceholderSpan]s have a text length of 1, which corresponds to the object - /// replacement character (0xFFFC) that is inserted to represent it. - /// - /// Null is added to `semanticsElements` for [PlaceholderSpan]s. - void describeSemantics(Accumulator offset, List semanticsOffsets, List semanticsElements) { - semanticsOffsets.add(offset.value); - semanticsOffsets.add(offset.value + 1); - semanticsElements.add(null); // null indicates this is a placeholder. - offset.increment(1); - } - @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); diff --git a/packages/flutter/lib/src/painting/text_span.dart b/packages/flutter/lib/src/painting/text_span.dart index c3f37310332..634932ee6fc 100644 --- a/packages/flutter/lib/src/painting/text_span.dart +++ b/packages/flutter/lib/src/painting/text_span.dart @@ -431,25 +431,6 @@ class TextSpan extends InlineSpan implements HitTestTarget, MouseTrackerAnnotati return localOffset < text.length ? text.codeUnitAt(localOffset) : null; } - /// Populates the `semanticsOffsets` and `semanticsElements` with the appropriate data - /// to be able to construct a [SemanticsNode]. - /// - /// If applicable, the beginning and end text offset are added to [semanticsOffsets]. - /// [PlaceholderSpan]s have a text length of 1, which corresponds to the object - /// replacement character (0xFFFC) that is inserted to represent it. - /// - /// Any [GestureRecognizer]s are added to `semanticsElements`. Null is added to - /// `semanticsElements` for [PlaceholderSpan]s. - void describeSemantics(Accumulator offset, List semanticsOffsets, List semanticsElements) { - if (recognizer is TapGestureRecognizer || recognizer is LongPressGestureRecognizer) { - final int length = semanticsLabel?.length ?? text!.length; - semanticsOffsets.add(offset.value); - semanticsOffsets.add(offset.value + length); - semanticsElements.add(recognizer); - } - offset.increment(text != null ? text!.length : 0); - } - /// In debug mode, throws an exception if the object is not in a valid /// configuration. Otherwise, returns true. ///