Unverified Commit 938e4eb6 authored by Gary Qian's avatar Gary Qian Committed by GitHub

Add recognizer compatibility API (#34086)

parent 6180a150
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import 'dart:ui' as ui show ParagraphBuilder; import 'dart:ui' as ui show ParagraphBuilder;
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'basic_types.dart'; import 'basic_types.dart';
import 'text_painter.dart'; import 'text_painter.dart';
...@@ -102,6 +103,11 @@ abstract class InlineSpan extends DiagnosticableTree { ...@@ -102,6 +103,11 @@ abstract class InlineSpan extends DiagnosticableTree {
@Deprecated('InlineSpan does not innately have children. Use TextSpan.children instead.') @Deprecated('InlineSpan does not innately have children. Use TextSpan.children instead.')
List<InlineSpan> get children => null; List<InlineSpan> get children => null;
/// Returns the [GestureRecognizer] associated with this span if this is an
/// instance of [TextSpan], otherwise returns null.
@Deprecated('InlineSpan does not innately have a recognizer. Use TextSpan.recognizer instead.')
GestureRecognizer get recognizer => null;
/// Apply the properties of this object to the given [ParagraphBuilder], from /// Apply the properties of this object to the given [ParagraphBuilder], from
/// which a [Paragraph] can be obtained. /// which a [Paragraph] can be obtained.
/// ///
......
...@@ -170,6 +170,7 @@ class TextSpan extends InlineSpan { ...@@ -170,6 +170,7 @@ class TextSpan extends InlineSpan {
/// } /// }
/// ``` /// ```
/// {@end-tool} /// {@end-tool}
@override
final GestureRecognizer recognizer; final GestureRecognizer recognizer;
/// An alternative semantics label for this [TextSpan]. /// An alternative semantics label for this [TextSpan].
......
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