@@ -450,7 +450,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
450450 // the new window causing the Flutter application to go inactive. In this
451451 // case we want to retain the selection so it remains when we return to
452452 // the Flutter application.
453- _clearSelection ();
453+ clearSelection ();
454454 }
455455 }
456456 if (kIsWeb) {
@@ -559,7 +559,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
559559 ..onDragStart = _handleMouseDragStart
560560 ..onDragUpdate = _handleMouseDragUpdate
561561 ..onDragEnd = _handleMouseDragEnd
562- ..onCancel = _clearSelection
562+ ..onCancel = clearSelection
563563 ..dragStartBehavior = DragStartBehavior .down;
564564 },
565565 );
@@ -607,7 +607,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
607607 ..onDragStart = _handleMouseDragStart
608608 ..onDragUpdate = _handleMouseDragUpdate
609609 ..onDragEnd = _handleMouseDragEnd
610- ..onCancel = _clearSelection
610+ ..onCancel = clearSelection
611611 ..dragStartBehavior = DragStartBehavior .down;
612612 },
613613 );
@@ -1228,7 +1228,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
12281228 /// See also:
12291229 /// * [_selectStartTo] , which sets or updates selection start edge.
12301230 /// * [_finalizeSelection] , which stops the `continuous` updates.
1231- /// * [_clearSelection ] , which clears the ongoing selection.
1231+ /// * [clearSelection ] , which clears the ongoing selection.
12321232 /// * [_selectWordAt] , which selects a whole word at the location.
12331233 /// * [_selectParagraphAt] , which selects an entire paragraph at the location.
12341234 /// * [_collapseSelectionAt] , which collapses the selection at the location.
@@ -1269,7 +1269,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
12691269 /// See also:
12701270 /// * [_selectEndTo] , which sets or updates selection end edge.
12711271 /// * [_finalizeSelection] , which stops the `continuous` updates.
1272- /// * [_clearSelection ] , which clears the ongoing selection.
1272+ /// * [clearSelection ] , which clears the ongoing selection.
12731273 /// * [_selectWordAt] , which selects a whole word at the location.
12741274 /// * [_selectParagraphAt] , which selects an entire paragraph at the location.
12751275 /// * [_collapseSelectionAt] , which collapses the selection at the location.
@@ -1293,7 +1293,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
12931293 /// * [_selectStartTo] , which sets or updates selection start edge.
12941294 /// * [_selectEndTo] , which sets or updates selection end edge.
12951295 /// * [_finalizeSelection] , which stops the `continuous` updates.
1296- /// * [_clearSelection ] , which clears the ongoing selection.
1296+ /// * [clearSelection ] , which clears the ongoing selection.
12971297 /// * [_selectWordAt] , which selects a whole word at the location.
12981298 /// * [_selectParagraphAt] , which selects an entire paragraph at the location.
12991299 /// * [selectAll] , which selects the entire content.
@@ -1307,7 +1307,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
13071307 /// The `offset` is in global coordinates.
13081308 ///
13091309 /// 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
13111311 /// updated even if the word is already covered by the current selection.
13121312 ///
13131313 /// One can also use [_selectEndTo] or [_selectStartTo] to adjust the selection
@@ -1317,7 +1317,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
13171317 /// * [_selectStartTo] , which sets or updates selection start edge.
13181318 /// * [_selectEndTo] , which sets or updates selection end edge.
13191319 /// * [_finalizeSelection] , which stops the `continuous` updates.
1320- /// * [_clearSelection ] , which clears the ongoing selection.
1320+ /// * [clearSelection ] , which clears the ongoing selection.
13211321 /// * [_collapseSelectionAt] , which collapses the selection at the location.
13221322 /// * [_selectParagraphAt] , which selects an entire paragraph at the location.
13231323 /// * [selectAll] , which selects the entire content.
@@ -1332,7 +1332,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
13321332 /// The `offset` is in global coordinates.
13331333 ///
13341334 /// 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
13361336 /// updated even if the paragraph is already covered by the current selection.
13371337 ///
13381338 /// One can also use [_selectEndTo] or [_selectStartTo] to adjust the selection
@@ -1342,7 +1342,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
13421342 /// * [_selectStartTo] , which sets or updates selection start edge.
13431343 /// * [_selectEndTo] , which sets or updates selection end edge.
13441344 /// * [_finalizeSelection] , which stops the `continuous` updates.
1345- /// * [_clearSelection ] , which clear the ongoing selection.
1345+ /// * [clearSelection ] , which clear the ongoing selection.
13461346 /// * [_selectWordAt] , which selects a whole word at the location.
13471347 /// * [selectAll] , which selects the entire content.
13481348 void _selectParagraphAt ({required Offset offset}) {
@@ -1353,7 +1353,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
13531353
13541354 /// Stops any ongoing selection updates.
13551355 ///
1356- /// This method is different from [_clearSelection ] that it does not remove
1356+ /// This method is different from [clearSelection ] that it does not remove
13571357 /// the current selection. It only stops the continuous updates.
13581358 ///
13591359 /// A continuous update can happen as result of calling [_selectStartTo] or
@@ -1365,8 +1365,8 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
13651365 _stopSelectionStartEdgeUpdate ();
13661366 }
13671367
1368- /// Removes the ongoing selection.
1369- void _clearSelection () {
1368+ /// Removes the ongoing selection for this [SelectableRegion] .
1369+ void clearSelection () {
13701370 _finalizeSelection ();
13711371 _directionalHorizontalBaseline = null ;
13721372 _adjustingSelectionEnd = null ;
@@ -1496,7 +1496,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
14961496 switch (defaultTargetPlatform) {
14971497 case TargetPlatform .android:
14981498 case TargetPlatform .fuchsia:
1499- _clearSelection ();
1499+ clearSelection ();
15001500 case TargetPlatform .iOS:
15011501 hideToolbar (false );
15021502 case TargetPlatform .linux:
@@ -1525,7 +1525,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
15251525 switch (defaultTargetPlatform) {
15261526 case TargetPlatform .android:
15271527 case TargetPlatform .fuchsia:
1528- _clearSelection ();
1528+ clearSelection ();
15291529 case TargetPlatform .iOS:
15301530 hideToolbar (false );
15311531 case TargetPlatform .linux:
@@ -1619,7 +1619,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
16191619
16201620 @override
16211621 void selectAll ([SelectionChangedCause ? cause]) {
1622- _clearSelection ();
1622+ clearSelection ();
16231623 _selectable? .dispatchSelectionEvent (const SelectAllSelectionEvent ());
16241624 if (cause == SelectionChangedCause .toolbar) {
16251625 _showToolbar ();
@@ -1635,7 +1635,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
16351635 @override
16361636 void copySelection (SelectionChangedCause cause) {
16371637 _copy ();
1638- _clearSelection ();
1638+ clearSelection ();
16391639 }
16401640
16411641 @Deprecated (
0 commit comments