File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,9 @@ class _SelectableTextSelectionGestureDetectorBuilder extends TextSelectionGestur
151
151
152
152
/// A run of selectable text with a single style.
153
153
///
154
+ /// Consider using [SelectionArea] or [SelectableRegion] instead, which enable
155
+ /// selection on a widget subtree, including but not limited to [Text] widgets.
156
+ ///
154
157
/// The [SelectableText] widget displays a string of text with a single style.
155
158
/// The string might break across multiple lines or might all be displayed on
156
159
/// the same line depending on the layout constraints.
@@ -214,6 +217,8 @@ class _SelectableTextSelectionGestureDetectorBuilder extends TextSelectionGestur
214
217
///
215
218
/// * [Text] , which is the non selectable version of this widget.
216
219
/// * [TextField] , which is the editable version of this widget.
220
+ /// * [SelectionArea] , which enables the selection of multiple [Text] widgets
221
+ /// and of other widgets.
217
222
class SelectableText extends StatefulWidget {
218
223
/// Creates a selectable text widget.
219
224
///
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import 'theme.dart';
35
35
/// See also:
36
36
///
37
37
/// * [SelectableRegion] , which provides an overview of the selection system.
38
+ /// * [SelectableText] , which enables selection on a single run of text.
38
39
class SelectionArea extends StatefulWidget {
39
40
/// Creates a [SelectionArea] .
40
41
///
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ const double _kSelectableVerticalComparingThreshold = 3.0;
195
195
///
196
196
/// * [SelectionArea] , which creates a [SelectableRegion] with
197
197
/// platform-adaptive selection controls.
198
+ /// * [SelectableText] , which enables selection on a single run of text.
198
199
/// * [SelectionHandler] , which contains APIs to handle selection events from the
199
200
/// [SelectableRegion].
200
201
/// * [Selectable] , which provides API to participate in the selection system.
You can’t perform that action at this time.
0 commit comments