10 Commits

Author SHA1 Message Date
Renzo Olivares
d81c8aa88b
SelectionArea long press selection overlay behavior should match native (#133967)
During a long press, on native iOS the context menu does not show until the long press has ended. The handles are shown immediately when the long press begins. This is true for static and editable text.

For static text on Android, the context menu appears when the long press is initiated, but the handles do not appear until the long press has ended. For editable text on Android, the context menu does not appear until the long press ended, and the handles also do not appear until the end.

For both platforms in editable/static contexts the context menu does not show while doing a long press drag.

I think the behavior where the context menu is not shown until the long press ends makes the most sense even though Android varies in this depending on the context. The user is not able to react to the context menu until the long press has ended.

Other details:
On a windows touch screen device the context menu does not show up until the long press ends in editable/static text contexts. On a long press hold it selects the word on drag start as well as popping up the selection handles (static text).
2023-09-26 22:06:15 +00:00
Kostia Sokolovskyi
98ebab58ee
Cover more test/widgets tests with leak tracking #8 (#135045) 2023-09-20 07:34:41 -07:00
Renzo Olivares
457d00449d
Add double click and double click + drag gestures to SelectionArea (#124817)
Adds double click to select a word.
Adds double click + drag to select word by word.

https://user-images.githubusercontent.com/948037/234363577-941c36bc-ac42-4b7f-84aa-26b106c9ff05.mov

Partially fixes #104552
2023-08-11 21:08:39 +00:00
Hans Muller
0d4b5ae122
Dev, examples/api, etc updated for Material 3 by default (#129683)
Updated tests in dev, examples/api, and tests/widgets to ensure that
they continue to pass when the default for `ThemeData.useMaterial3` is
changed to true.

This is the final set of changes required for
https://github.com/flutter/flutter/issues/127064.
2023-06-28 09:41:58 -07:00
chunhtai
cc9ffd3f3b
SelectionContainer's listeners can remove itself during listener call… (#124624)
When swapping out delegate of  selectioncontainer, if the newly passed in delegate doesn't have any selectable content(which is usually the case), the selectioncontainerstate will notify all of the listeners. One of the listener would be SelectionRegistrant._updateSelectionRegistrarSubscription, and since it doesn't have content, it would remove itself from the listener which causes concurrent modification
2023-04-17 23:19:11 +00:00
Ian Hickson
07c548c698
Apply BindingBase.checkInstance to TestDefaultBinaryMessengerBinding (#116937) 2023-02-13 23:55:58 +00:00
chunhtai
c2b29501f4
Add selection feedback for both selection area and text field (#115373)
* Add selection feedback for both selection area and text field

* Addressing comment

* Fixes more test
2022-11-17 18:27:56 +00:00
chunhtai
80bf355192
Support keyboard selection in SelectabledRegion (#112584)
* Support keyboard selection in selectable region

* fix some comments

* addressing comments
2022-11-04 10:55:28 -07:00
chunhtai
492bfddd9f
Fix selection area causes small scrollables to bounce (#112816) 2022-10-10 19:57:02 +00:00
chunhtai
efb9368573
Supports global selection for all devices (#95226)
* Support global selection

* addressing comments

* add new test

* Addressing review comments

* update

* addressing comments

* addressing comments

* Addressing comments

* fix build
2022-05-24 13:53:55 -07:00