Add recognizer compatibility API (#34086)
This commit is contained in:
parent
6180a150c9
commit
938e4eb636
@ -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 {
|
|||||||
@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 {
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
/// {@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].
|
||||||
|
Loading…
x
Reference in New Issue
Block a user