Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
aca050a
Add SelectedContentRange/SelectionListener/SelectionDetails
Renzo-Olivares May 9, 2024
5c88fa8
flattened approach
Aug 14, 2024
083ea6f
add global offsets to SelectionDetails
Aug 20, 2024
8c77d71
Update examples and clean up docs
Aug 27, 2024
e293343
clean up
Aug 27, 2024
c46ac46
updates
Aug 27, 2024
94aeb1a
fix analyzer and tests
Aug 27, 2024
d300589
clean up
Aug 27, 2024
b8013d6
Determine if selection is forward or backward
Aug 27, 2024
53f6fac
default to forward selection
Aug 27, 2024
731ca7f
update example
Aug 27, 2024
99e07c5
update test
Aug 28, 2024
d521e47
Address reviewer comments
Aug 28, 2024
e9fd058
address comments
Aug 30, 2024
44dcb02
use diagnosticable
Aug 30, 2024
5a04514
make empty a const constructor
Aug 30, 2024
10d06ec
make determineSelectionForward static
Aug 30, 2024
208927b
update docs
Aug 30, 2024
3398bb6
update docs
Aug 30, 2024
a347138
update docs
Aug 30, 2024
b9b5d73
getSelections -> getSelection
Sep 7, 2024
009560b
Make SelectionDetails final
Sep 7, 2024
27527c4
fix SelectionDetails Diagnosticable
Sep 7, 2024
aad43b5
Fix offset calculation when selectable is not at the start of the con…
Sep 7, 2024
bc191f8
update docs
Sep 9, 2024
f16fd75
update docs
Sep 9, 2024
58427fe
update docs
Sep 9, 2024
6702c13
update docs
Sep 9, 2024
3a6a0c7
update docs
Sep 9, 2024
8e4c45c
update docs
Sep 9, 2024
f3c81de
update docs
Sep 9, 2024
3f983ea
update docs
Sep 9, 2024
867cf35
remove unnecessary assert
Sep 9, 2024
cb7d5f4
should return an empty SelectedContentRange when both edges have not …
Sep 9, 2024
f715234
add asserts to SelectedContentRange
Sep 9, 2024
1880d3b
update docs
Sep 10, 2024
59ddb9c
Address reviewer comments and fix analyzer
Sep 11, 2024
62551c8
Allow users of SelectionListener to receive selection cleared events
Sep 12, 2024
ca6ccd9
simplify totalContentLength calculation
Sep 12, 2024
eeba293
Add CollapseSelectionEvent
Sep 13, 2024
b6bb79d
Revert "Add CollapseSelectionEvent"
Sep 13, 2024
b45ee93
send selection finalized when shift + click
Sep 13, 2024
2e4906e
update indentation
Sep 13, 2024
043227f
address some reviewer comments
Sep 23, 2024
68a0755
fix tests
Sep 24, 2024
761092c
updates
Sep 30, 2024
c9a8d57
simply color selection red example
Sep 30, 2024
47138e4
fix docs
Oct 1, 2024
ff28512
SelectionController
Oct 7, 2024
6faa0bd
fix selection listener finalized notifications
Oct 10, 2024
a536175
removed SelectionFinalizedSelectionEvent
Oct 16, 2024
7aeafd6
fix analyzer
Oct 16, 2024
df86c83
rename and update docs
Oct 22, 2024
40b28a2
isValid -> isEmpty
Oct 22, 2024
e1bdef6
update example tests
Oct 24, 2024
2634e11
Add assert for foundStart
Oct 24, 2024
3d97450
fix analyzer
Oct 24, 2024
3219566
update example comments
Oct 24, 2024
4ba567c
update docs
Oct 24, 2024
c9ef48d
updates
Oct 24, 2024
c70ff5c
use ObserverList instead of duplicate code
Oct 29, 2024
f20bb6f
Add assert against providing same selection notifier to multiple sele…
Oct 29, 2024
09851ae
update docs
Oct 29, 2024
7fa4845
updates
Oct 29, 2024
219583f
updates
Nov 5, 2024
2e21eaa
fix
Nov 11, 2024
19825c9
Properly dispose SelectableRegionSelectionStatusNotifier
Nov 12, 2024
60f5fd1
move contentLength API to SelectionHandler and rename isEmpty to isValid
Nov 12, 2024
93eac76
make getSelection nullable
Nov 12, 2024
7ed7ee3
avoid unecessesary getSelectedContent call when onSelectionChanged is…
Nov 12, 2024
9911419
Clean up tests
Nov 12, 2024
82738d9
updates
Nov 12, 2024
a2d0aa9
update docs
Nov 13, 2024
d54a944
Use ValueListenable instead of exposing SelectableRegionSelectionStat…
Nov 13, 2024
690eeeb
update docs
Nov 13, 2024
bafbd8d
update docs
Nov 13, 2024
934bb67
fix test
Nov 13, 2024
a7c89fd
update docs
Nov 13, 2024
a4c627d
update docs
Nov 13, 2024
a241205
Update docs and address comments
Nov 13, 2024
0b0c0c4
address more comments
Nov 13, 2024
726c153
Use data interface SelectionDetails
Nov 13, 2024
c32720f
update docs
Nov 13, 2024
d76f04b
Update tests to reflect latest focusNode framework changes
Nov 18, 2024
9577c80
Address reviewer comments
Nov 22, 2024
6f9d55b
suppress initial selectiongeometry notification
Nov 22, 2024
c618374
update documentation
Nov 22, 2024
030a219
Address reviewer comments
Nov 25, 2024
7edd8e2
Update selectableregionselectionstatus when selection handles are moved
Nov 25, 2024
6866e1a
clean up
Nov 25, 2024
9daf534
clean up
Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update selectableregionselectionstatus when selection handles are moved
  • Loading branch information
Renzo Olivares committed Nov 25, 2024
commit 7edd8e244de57c04a120550d58b495c9da1bd339
2 changes: 2 additions & 0 deletions packages/flutter/lib/src/widgets/selectable_region.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
_selectionDelegate.value.startSelectionPoint!,
));
_updateSelectedContentIfNeeded();
_selectionStatusNotifier.value = SelectableRegionSelectionStatus.changing;
}

void _handleSelectionEndHandleDragStart(DragStartDetails details) {
Expand Down Expand Up @@ -1152,6 +1153,7 @@ class SelectableRegionState extends State<SelectableRegion> with TextSelectionDe
_selectionDelegate.value.endSelectionPoint!,
));
_updateSelectedContentIfNeeded();
_selectionStatusNotifier.value = SelectableRegionSelectionStatus.changing;
}

MagnifierInfo _buildInfoForMagnifier(Offset globalGesturePosition, SelectionPoint selectionPoint) {
Expand Down