@@ -450,7 +450,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
450
450
// the new window causing the Flutter application to go inactive. In this
451
451
// case we want to retain the selection so it remains when we return to
452
452
// the Flutter application.
453
- _clearSelection ();
453
+ clearSelection ();
454
454
}
455
455
}
456
456
if (kIsWeb) {
@@ -559,7 +559,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
559
559
..onDragStart = _handleMouseDragStart
560
560
..onDragUpdate = _handleMouseDragUpdate
561
561
..onDragEnd = _handleMouseDragEnd
562
- ..onCancel = _clearSelection
562
+ ..onCancel = clearSelection
563
563
..dragStartBehavior = DragStartBehavior .down;
564
564
},
565
565
);
@@ -607,7 +607,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
607
607
..onDragStart = _handleMouseDragStart
608
608
..onDragUpdate = _handleMouseDragUpdate
609
609
..onDragEnd = _handleMouseDragEnd
610
- ..onCancel = _clearSelection
610
+ ..onCancel = clearSelection
611
611
..dragStartBehavior = DragStartBehavior .down;
612
612
},
613
613
);
@@ -1228,7 +1228,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1228
1228
/// See also:
1229
1229
/// * [_selectStartTo] , which sets or updates selection start edge.
1230
1230
/// * [_finalizeSelection] , which stops the `continuous` updates.
1231
- /// * [_clearSelection ] , which clears the ongoing selection.
1231
+ /// * [clearSelection ] , which clears the ongoing selection.
1232
1232
/// * [_selectWordAt] , which selects a whole word at the location.
1233
1233
/// * [_selectParagraphAt] , which selects an entire paragraph at the location.
1234
1234
/// * [_collapseSelectionAt] , which collapses the selection at the location.
@@ -1269,7 +1269,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1269
1269
/// See also:
1270
1270
/// * [_selectEndTo] , which sets or updates selection end edge.
1271
1271
/// * [_finalizeSelection] , which stops the `continuous` updates.
1272
- /// * [_clearSelection ] , which clears the ongoing selection.
1272
+ /// * [clearSelection ] , which clears the ongoing selection.
1273
1273
/// * [_selectWordAt] , which selects a whole word at the location.
1274
1274
/// * [_selectParagraphAt] , which selects an entire paragraph at the location.
1275
1275
/// * [_collapseSelectionAt] , which collapses the selection at the location.
@@ -1293,7 +1293,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1293
1293
/// * [_selectStartTo] , which sets or updates selection start edge.
1294
1294
/// * [_selectEndTo] , which sets or updates selection end edge.
1295
1295
/// * [_finalizeSelection] , which stops the `continuous` updates.
1296
- /// * [_clearSelection ] , which clears the ongoing selection.
1296
+ /// * [clearSelection ] , which clears the ongoing selection.
1297
1297
/// * [_selectWordAt] , which selects a whole word at the location.
1298
1298
/// * [_selectParagraphAt] , which selects an entire paragraph at the location.
1299
1299
/// * [selectAll] , which selects the entire content.
@@ -1307,7 +1307,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1307
1307
/// The `offset` is in global coordinates.
1308
1308
///
1309
1309
/// If the whole word is already in the current selection, selection won't
1310
- /// change. One call [_clearSelection ] first if the selection needs to be
1310
+ /// change. One call [clearSelection ] first if the selection needs to be
1311
1311
/// updated even if the word is already covered by the current selection.
1312
1312
///
1313
1313
/// One can also use [_selectEndTo] or [_selectStartTo] to adjust the selection
@@ -1317,7 +1317,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1317
1317
/// * [_selectStartTo] , which sets or updates selection start edge.
1318
1318
/// * [_selectEndTo] , which sets or updates selection end edge.
1319
1319
/// * [_finalizeSelection] , which stops the `continuous` updates.
1320
- /// * [_clearSelection ] , which clears the ongoing selection.
1320
+ /// * [clearSelection ] , which clears the ongoing selection.
1321
1321
/// * [_collapseSelectionAt] , which collapses the selection at the location.
1322
1322
/// * [_selectParagraphAt] , which selects an entire paragraph at the location.
1323
1323
/// * [selectAll] , which selects the entire content.
@@ -1332,7 +1332,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1332
1332
/// The `offset` is in global coordinates.
1333
1333
///
1334
1334
/// If the paragraph is already in the current selection, selection won't
1335
- /// change. One call [_clearSelection ] first if the selection needs to be
1335
+ /// change. One call [clearSelection ] first if the selection needs to be
1336
1336
/// updated even if the paragraph is already covered by the current selection.
1337
1337
///
1338
1338
/// One can also use [_selectEndTo] or [_selectStartTo] to adjust the selection
@@ -1342,7 +1342,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1342
1342
/// * [_selectStartTo] , which sets or updates selection start edge.
1343
1343
/// * [_selectEndTo] , which sets or updates selection end edge.
1344
1344
/// * [_finalizeSelection] , which stops the `continuous` updates.
1345
- /// * [_clearSelection ] , which clear the ongoing selection.
1345
+ /// * [clearSelection ] , which clear the ongoing selection.
1346
1346
/// * [_selectWordAt] , which selects a whole word at the location.
1347
1347
/// * [selectAll] , which selects the entire content.
1348
1348
void _selectParagraphAt ({required Offset offset}) {
@@ -1353,7 +1353,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1353
1353
1354
1354
/// Stops any ongoing selection updates.
1355
1355
///
1356
- /// This method is different from [_clearSelection ] that it does not remove
1356
+ /// This method is different from [clearSelection ] that it does not remove
1357
1357
/// the current selection. It only stops the continuous updates.
1358
1358
///
1359
1359
/// A continuous update can happen as result of calling [_selectStartTo] or
@@ -1365,8 +1365,8 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1365
1365
_stopSelectionStartEdgeUpdate ();
1366
1366
}
1367
1367
1368
- /// Removes the ongoing selection.
1369
- void _clearSelection () {
1368
+ /// Removes the ongoing selection for this [SelectableRegion] .
1369
+ void clearSelection () {
1370
1370
_finalizeSelection ();
1371
1371
_directionalHorizontalBaseline = null ;
1372
1372
_adjustingSelectionEnd = null ;
@@ -1496,7 +1496,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1496
1496
switch (defaultTargetPlatform) {
1497
1497
case TargetPlatform .android:
1498
1498
case TargetPlatform .fuchsia:
1499
- _clearSelection ();
1499
+ clearSelection ();
1500
1500
case TargetPlatform .iOS:
1501
1501
hideToolbar (false );
1502
1502
case TargetPlatform .linux:
@@ -1525,7 +1525,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1525
1525
switch (defaultTargetPlatform) {
1526
1526
case TargetPlatform .android:
1527
1527
case TargetPlatform .fuchsia:
1528
- _clearSelection ();
1528
+ clearSelection ();
1529
1529
case TargetPlatform .iOS:
1530
1530
hideToolbar (false );
1531
1531
case TargetPlatform .linux:
@@ -1619,7 +1619,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1619
1619
1620
1620
@override
1621
1621
void selectAll ([SelectionChangedCause ? cause]) {
1622
- _clearSelection ();
1622
+ clearSelection ();
1623
1623
_selectable? .dispatchSelectionEvent (const SelectAllSelectionEvent ());
1624
1624
if (cause == SelectionChangedCause .toolbar) {
1625
1625
_showToolbar ();
@@ -1635,7 +1635,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
1635
1635
@override
1636
1636
void copySelection (SelectionChangedCause cause) {
1637
1637
_copy ();
1638
- _clearSelection ();
1638
+ clearSelection ();
1639
1639
}
1640
1640
1641
1641
@Deprecated (
0 commit comments