diff --git a/packages/flutter/lib/src/material/selectable_text.dart b/packages/flutter/lib/src/material/selectable_text.dart index ee158b8722..90a4ad7f41 100644 --- a/packages/flutter/lib/src/material/selectable_text.dart +++ b/packages/flutter/lib/src/material/selectable_text.dart @@ -151,6 +151,9 @@ class _SelectableTextSelectionGestureDetectorBuilder extends TextSelectionGestur /// A run of selectable text with a single style. /// +/// Consider using [SelectionArea] or [SelectableRegion] instead, which enable +/// selection on a widget subtree, including but not limited to [Text] widgets. +/// /// The [SelectableText] widget displays a string of text with a single style. /// The string might break across multiple lines or might all be displayed on /// the same line depending on the layout constraints. @@ -214,6 +217,8 @@ class _SelectableTextSelectionGestureDetectorBuilder extends TextSelectionGestur /// /// * [Text], which is the non selectable version of this widget. /// * [TextField], which is the editable version of this widget. +/// * [SelectionArea], which enables the selection of multiple [Text] widgets +/// and of other widgets. class SelectableText extends StatefulWidget { /// Creates a selectable text widget. /// diff --git a/packages/flutter/lib/src/material/selection_area.dart b/packages/flutter/lib/src/material/selection_area.dart index 260452db7f..2865c74416 100644 --- a/packages/flutter/lib/src/material/selection_area.dart +++ b/packages/flutter/lib/src/material/selection_area.dart @@ -35,6 +35,7 @@ import 'theme.dart'; /// See also: /// /// * [SelectableRegion], which provides an overview of the selection system. +/// * [SelectableText], which enables selection on a single run of text. class SelectionArea extends StatefulWidget { /// Creates a [SelectionArea]. /// diff --git a/packages/flutter/lib/src/widgets/selectable_region.dart b/packages/flutter/lib/src/widgets/selectable_region.dart index 30759236d2..519489c66b 100644 --- a/packages/flutter/lib/src/widgets/selectable_region.dart +++ b/packages/flutter/lib/src/widgets/selectable_region.dart @@ -195,6 +195,7 @@ const double _kSelectableVerticalComparingThreshold = 3.0; /// /// * [SelectionArea], which creates a [SelectableRegion] with /// platform-adaptive selection controls. +/// * [SelectableText], which enables selection on a single run of text. /// * [SelectionHandler], which contains APIs to handle selection events from the /// [SelectableRegion]. /// * [Selectable], which provides API to participate in the selection system.