2838 Commits

Author SHA1 Message Date
Xilai Zhang
4b4783d1f0
[flutter roll] Revert both #117338 and #117547 (#117557)
* Revert "Exposed tooltip longPress action when available (#117338)"

This reverts commit 38e3930f39d8efca0a27f9663129d27a9093cca8.

* Revert "fixes android_semantics_integration_test to expect long press for tootip"
2022-12-23 22:46:45 +00:00
Michael Goderbauer
999356b776
Remove single-view assumption from ScrollPhysics (#117503)
* Remove single-view assumption from ScrollPhysics

* fix scrollable_dispose_test.dart

* add deprecated method back
2022-12-22 21:54:09 +00:00
Renzo Olivares
39fa0117a9
Revert "Add support for double tap and drag for text selection (#109573)" (#117497)
This reverts commit cd0f15a770992ec41445bd212aac73572c278fd1.

Co-authored-by: Renzo Olivares <roliv@google.com>
2022-12-21 23:29:07 +00:00
Justin McCandless
8ff1b6eb5e
Fix Scaffold bottomSheet null exceptions (#117008)
* Prevent possibility of null exceptions on widget.bottomSheet

* New approach that fixes bug in updating the bottomSheet

* Real-world test for bottomSheet error

* Allow bottomSheet to animate out after being killed, even if it was rebuilt

* Go back to the simple solution of SizedBox.shrink
2022-12-21 21:58:23 +00:00
Taha Tesser
ff347bfde5
Fix InkRipple doesn't respect rectCallback when rendering ink circle (#117395) 2022-12-21 21:18:00 +00:00
hangyu
9a347fb063
Support safe area and scrolling in the NavigationDrawer (#116995)
* Update navigation_drawer.dart

* Update navigation_drawer_test.dart

* Update navigation_drawer_test.dart

* update tests

* Update navigation_drawer_test.dart

* Update navigation_drawer_test.dart
2022-12-21 10:38:52 -08:00
Renzo Olivares
cd0f15a770
Add support for double tap and drag for text selection (#109573)
* Replace PanGestureRecognizer in TextSelection with TapAndDragGestureRecognizer

* add tracking of _DragState to new tap_and_drag recognizer and remove some legacy double tap code from text_selection.dart and add logs"

* add dragTapCount, a tap count that is persistent for an entire drag and is set to null on drag end vs the regular tap count which is reset on a timer

* basic double tap to drag functionality and add a local dragTapCount in text_selection.dart to use with the timer callback

* Add offsetFromOrigin and localOffsetFromOrigin to DragUpdateDetails similar to LongPressMoveUpdateDetails, eliminates the need to hold the state of lastDragStartDetails

* make a generic baselongpressgesturerecognizer

* Revert "make a generic baselongpressgesturerecognizer"

This reverts commit aad8f7433bd01e4cd016d527af832c3b1f15fac5.

* rename tap_and_drag to selection_recognizers

* add mixin for consecutivetap

* tap and long press gesture recognizer

* Revert "Revert "make a generic baselongpressgesturerecognizer""

This reverts commit 181350c36718f644eada3e45c1b7b5939f90a340.

* Revert "Revert "Revert "make a generic baselongpressgesturerecognizer"""

This reverts commit 4d69775967858dfd66dd9429e1713da598908a85.

* Add support for secondary button clicks on drag gesture recognizer and separate drag end and tap up callback

* get test running

* rename tapCount to consecutiveTapCount

* dispose timer properly

* add some comments to tests

* Add comments

* Make ConsecutiveTapMixin private and move logic to increment tap count into mixin

* stop tracking pointer when gesture is rejected and detect drags on touch devices

* onCancel for TapAndDrag

* have the TapAndDragGestureRecognizer handle tap downs and tap ups on touch and mouse devices

* add drag to move cursor for android and iOS, and pointer device kind to DragUpdateDetails

* get tests running

* refactor TapAndDragGestureRecognizer moving some logic into _check methods

* Handle cancel properly on TapAndDragGestureRecognizer, having both onTapCancel and onDragCancel, also fix tests

* Fix test mouse drag selects and cannot drag cursor, save _initialPosition based on dragStartBehavior (either on tapDown or dragStart)

* determine if drag has a sufficient global distance to accept and fix some cancel behavior, making _checkCancel clearer

* give up pointer on drag end

* properly stop tracking pointer, fixes test for right click on Apple and non-apple platforms

* clean up some comments from last commit

* remove drag on touch for now

* fix Can select text by dragging with a mouse due to dragStart only being fired on the first PointerMoveEvent, the previous pan gesture recognizer would fire both dragStart and dragUpdate

* Revert "fix Can select text by dragging with a mouse due to dragStart only being fired on the first PointerMoveEvent, the previous pan gesture recognizer would fire both dragStart and dragUpdate"

This reverts commit 124dc79bc3389672c76d7c014ce04edab297abc6.

* correctly use _initialPosition for checkStart and call _checkUpdate after _checkStart if localDelta is not zero

* updates

* fix double tap chains

* Add docs

* Address analyzer

* more analyzer, only issues left are with print statements

* add deadlineTimer to fix conflict with ForcePressGestureRecognizer

* Revert "add deadlineTimer to fix conflict with ForcePressGestureRecognizer"

This reverts commit 3b29ddfff4cde4845edd481ecefb789fea2a0781.

* remove unecessary changes to tests

* secondaryButton should not drag

* Revert "Revert "add deadlineTimer to fix conflict with ForcePressGestureRecognizer""

This reverts commit 0a008f029f5796acd48c17c1897c0b700d5ef3a7.

* updates

* Revert "updates"

This reverts commit 4803b8443a2b67f0b8d29e9a01f712dfcb0f588c.

* Revert "Revert "Revert "add deadlineTimer to fix conflict with ForcePressGestureRecognizer"""

This reverts commit 79251a7af88d5dbb1460a960afc77e65dea18bff.

* fix shift + tap + drag tests, this was happening because a double tap + drag was being registered and not a single tap, added a duration to pumpAndSettle to fix this

* remove TapAndLongPressGestureRecognizer

* fix cupertino text field tests related to shift + tap + drag

* deadline timer try 2

* more logs

* Should reset taps when tap cancel is called, and should wait until gesture is accepted to initiate a drag

* should clear _down and _up when gesture is rejected

* remove erroneous log

* fix selectable text double tap chains test

* dont restart timer until tap up

* reset consecutiveTapCount on drag end

* fix selectableText test

* fix material text field tests

* reject TapAndDragGestureRecognizer when it is neither a tap nor a drag

* remove prints

* clean up

* shift aware

* clean up

* fix cupertino test

* fix text field focus tests

* Add 100ms delay to cupertino test, to prevent a double tap

* clean up test comments

* add comment to test

* uncomment test

* remove longpress changes

* Fix drag on mobile

* remove debug

* Fix drag to move cursor on iOS

* left over from drag fix

* add tests for drag on touch devices

* add test for double tap + drag mouse devices

* add tests

* Fix bug where initialPosition was used before it was set

* Address some review comments and fix issue where if double tap was held too long then long press gesture recognizer would take over

* remove _isDoubleTap flag since it is no longer needed due to previous commit

* Add docs for onTapCancel and onDragCancel

* analyzer fixes

* Do not test selection handles on macOS, since macOS does not support touch

* Add assert for dragStartBehavior

* add double tap + drag tests to cupertino

* use kDoubleTapTimeout instead of const Duration(milliseconds: 300) for readability

* analyzer issues

* update docs

* update more docs

* address comments

* more doc updates

* fix docs

* unused import

* fix docs

* Add more tests

* Add more tests and reject a tap up if we have exceeded the tap tolerance

* updates

* Address comments

* fix test naming

* update documentation

* move selection_recognizers to selection_gestures

* fix analyzer

* fix analyzer

* keysPressedOnDown instead of isShiftPressed

* update docs

* update docs

* Add drag update throttle to TapAndDragGestureRecognizer

* update comments

* missed from merge

* Replace _ConsecutiveTapMixin with _TapStatusTrackerMixin

* updates

* correctly cancel tap when when past tap tolerance with new implementation

* Should call tap and drag cancel if we are giving up a pointer without succesfully tracking a PointerUpEvent

* comments

* move pastTapTolerance to tap tracker

* move pastTapTolerance to tap tracker

* clean up check for nulls and remove use of consecutiveTapCountWhileDragging

* move call to super.acceptGesture to top

* remove print

* clean up

* Fix tests where both PanGestureRecognizer and TapAndDragGestureRecognizer lost

* clean up

* _GestureState -> _DragState

* more docs clean up

* more clean up

* Add onSecondaryTapCancel

* Add docs

* more docs

* Fix broken isPointerAllowed when attempting a right click drag - the _initialButtons is never reset

* revert debug flag

* make primaryPointer private

* Add support for upper count limit in TapAndDragGestureRecognizer, the tap counter should not be allowed to grow infinitely unless that is desired

* fix analyzer

* Use new TapDrag details objects and callbacks

* clean up docs

* clean up and add test for upperLimit

* Add docs for TapAndDragGestureRecognizer and remove some ambiguity of onStart onUpdate and onEnd parameters

* Address review comments

* analyzer fixes

* Call cancel before rejecting the gesture so we can still access _initialButtons

* Recognizer should reject any pointer differing from the original

* Revert "Recognizer should reject any pointer differing from the original"

This reverts commit afd9807480bd11e119bdd2b7d520631511973bab.

* Address reviewer comments

* Correct cancel behavior

* Fix consecutive tap + drag because _dragStart state was not being set when consecutive tap is greater than one

* Add more tests

* Add documentation on behavior with TapGestureRecognizer and DragGestureRecognizer

* more docs

* more docs

* remove comments

* updates

* fix multiple pointer behavior

* only handle the primary pointer

* Clean up dangerous assumptions in gesture details objects

* forgot from rebase

* update docs

* updates

* Clean up some redundant code

* remove whitespace

* fix tests as a result of #115849

* update test docs

* Fix same test from last commit for material variants

* More clean up of redundant code and update docs

* Clean up didStopTrackingLastPointer and untie TapAndDragGestureRecognizer cancel behavior from TapStatusTrackerMixin.currentUp state

* untie pastTapTolerance

* updates

* Add slopTolerance

* update docs

* Have secondary tap handled by TapGestureRecognizer

* update docs

* fix analyzer and address comments

* Add more docs

* Update cancel behavior tol not call on tap cancel when a drag has been accepted

* Change cancel behavior to only cancel if the tap down callback has been sent and merge tapcancel and dragcancel

* update docs;

* Rename selection_gestures to tap_and_drag_gestures

* Address some reviewer comments

* make deadline and slopTolerance private

* updates

* updates

* Address review comments

* remove _initialButtons

* fix docs

* trackTrap -> trackTap

* fix analyzer

* Add test to verify that tap up is called when recognizer accepts before handleEvent is called

* implement Diagnosticable for Details objects;

* sentTapDown == wonArenaForPrimaryPointer, so the implementation now only uses sentTapDown

* Count user tap up immediately and do not wait to win the arena

* Do not need to call super from TapAndDragGestureRecognizer.acceptGesture anymore because mixin implementation is gone

* Do not start selection drag on Android, iOS, and Fuchshsia touch devices if renderEditable does not have focus, this fixes many scubas

* Address reviewer comments

* fix test

* TapAndDragGestureRecognizer should wait for other recognizer to lose before winning the arena

* Address review comments

* Dont check for drag if the start was already found

* Only check for a drag if it has not already been found"

* fix from rebase

Co-authored-by: Renzo Olivares <roliv@google.com>
2022-12-21 01:01:04 +00:00
Michael Goderbauer
b308555ed1
Enable dangling_library_doc_comments and library_annotations lints (#117365) 2022-12-20 16:03:21 -08:00
Michael Goderbauer
81bc54be75
Enable use_colored_box lint (#117370) 2022-12-20 14:09:55 -08:00
Camille Simon
e0742ebb24
[Android] Add spell check suggestions toolbar (#114460)
* Add spell check suggestions toolbar

* Fix test and move menu

* Cleanup

* Cleanup and fix bug

* More cleanup

* Make height dynamic and use localized delete

* Begin adding tests

* Create var checking for results

* Add tests

* Fix analyze (sorta)

* Add back hideToolbar call for testing

* Add back hidetoolbar in ts and delete one in et

* Remove unecessary calls to hidToolbar

* Fix analyze and docs

* Test fix

* Fix container issue

* Clean up

* Fix analyze

* Move delegate

* Fix typos

* Start addressing review

* Continue addressing review

* Add assert

* Some refactoring

* Add test for button behavior

* Undo test change

* Make spell check results public

* Rearrange test

* Add comment

* Address review

* Finish addressing review

* remove unused imports

* Address nits

* Address review

* Fix formatting

* Refactor findsuggestionspanatcursorindex and textselectiontoolbar constraints

* Fix analyze:
2022-12-20 19:56:12 +00:00
Michael Goderbauer
fa3777bd3e
Enable sized_box_shrink_expand lint (#117371)
* Enable  lint

* note about discarded_futures

* note about use_decorated_box

* update note on require_trailing_commas
2022-12-20 19:07:15 +00:00
harperl-lgtm
38e3930f39
Exposed tooltip longPress action when available (#117338)
* Exposed tooltip longPress action when available (Trigger mode is long press)
2022-12-20 10:03:31 -05:00
harperl-lgtm
7f7a8778d8
Implemented Scrim Focus for BottomSheet (#116743)
* Implemented Scrim Focus for BottomSheet so that assistive technology users can focus and tap on the scrim to close the BottomSheet, which they could not do before the change . The Scrim Focus's size changes to avoid overlapping the BottomSheet.
2022-12-20 10:02:22 -05:00
Taha Tesser
5fcb48d598
Fix NavigationRail highlight (#117320) 2022-12-19 10:45:30 -08:00
Taha Tesser
cb988c7b6e
Add indicatorColor & indicatorShape to NavigationRail, NavigationDrawer and move these properties from destination to NavigationBar (#117049) 2022-12-19 10:39:27 -08:00
Michael Goderbauer
bf5fdb9f96
Reland "Inject current FlutterView into tree and make available via View.of(context) (#116924)" (#117244)
* Reland "Inject current `FlutterView` into tree and make available via `View.of(context)` (#116924)"

This reverts commit 9102f2fe0bd26db6074ac4a17785296cd341ecb9.

* remove window placeholder
2022-12-17 06:14:19 +00:00
Greg Spencer
ecf9b2d20a
Update localization of shortcut labels in menus (#116681)
* Fix Menu shortcut labels

* Remove invalid localizations

* Add more localization for Shift

* Add generated localizations

* Fix Test
2022-12-16 19:57:17 +00:00
Casey Hillers
9102f2fe0b
Revert "Inject current FlutterView into tree and make available via View.of(context) (#116924)" (#117214)
This reverts commit a34e41948461de77bdec3dcc884900cd4544abb1.
2022-12-16 17:48:23 +00:00
chunhtai
23a2fa31d2
Reland "Adds API in semanticsconfiguration to decide how to merge chi… (#116895)
* Reland "Adds API in semanticsconfiguration to decide how to merge child semanticsConfigurations (#110730)"

This reverts commit 7549925c8c44dea92c7bc75be676c17b7613f87f.

* makes markNeedsSemanticsUpdate more robust

* address comment
2022-12-16 17:20:20 +00:00
Eilidh Southren
da7b8327e4
Bottom App Bar M3 background color fix (#117082)
* Bottom App Bar M3 background color fix

* update test

* test update

* remove whitespace
2022-12-16 09:03:40 +00:00
LongCatIsLooong
76bb8ead5a
Reland "Fix text field label animation duration and curve" (#114646)"
This reverts commit 9f6090c9adb6265feaee68661dcf22fe3a2c5937.
2022-12-15 19:38:53 -08:00
Michael Goderbauer
a34e419484
Inject current FlutterView into tree and make available via View.of(context) (#116924)
* enable View.of

* tests

* ++

* greg review

* rewording

* hide view from public
2022-12-16 00:13:56 +00:00
Michael Goderbauer
409a39daea
remove debugPrint from timePicker test (#117111) 2022-12-15 17:07:52 +00:00
Taha Tesser
57fb36ee0a
[reland] Add Material 3 support for ListTile - Part 1 (#116963)
* [reland] Add Material 3 support for `ListTile` - Part 1

* Update doc
2022-12-14 21:13:59 +00:00
Taha Tesser
f07db4018a
NavigationBar improvements (#116992) 2022-12-13 17:25:49 -08:00
Greg Spencer
fae458b925
Convert TimePicker to Material 3 (#116396)
* Make some minor changes in preparation for updating the Time Picker to M3

* Revert OutlineInputBorder.borderRadius type change

* Revert more OutlineInputBorder.borderRadius changes.

* Convert TimePicker to Material 3

* Add example test

* Revert OutlineInputBorder.borderRadius type change

* Fix test

* Review Changes

* Merge changes

* Some sizing and elevation fixes

* Fix localization tests
2022-12-14 00:09:52 +00:00
Daniel Iglesia
0c7d84aa78
Add AppBar.forceMaterialTransparency (#101248) (#116867)
* Add AppBar.forceMaterialTransparency (#101248)

Allows gestures to reach widgets beneath the AppBar (when Scaffold.extendBodyBehindAppBar is true).
2022-12-14 09:45:50 +11:00
Hans Muller
882e105a4c
Revert "Add Material 3 support for ListTile - Part 1 (#116194)" (#116908)
This reverts commit e57b7f4ea8ab8b348810d0a76f7bcf4aeabbe6d2.
2022-12-12 20:06:21 +00:00
Taha Tesser
a8c9f9c6f4
Fix NavigationBar ripple for non-default NavigationDestinationLabelBehavior (#116888) 2022-12-12 18:02:20 +00:00
Ian Hickson
c02d53fc0e
More gracefully handle license loading failures (#87841) 2022-12-11 05:17:19 +00:00
Casey Hillers
7549925c8c
Revert "Adds API in semanticsconfiguration to decide how to merge child semanticsConfigurations (#110730)" (#116839)
This reverts commit 352ad3a9efccc8c54deb72eb0d7164bfb42b2a49.
2022-12-11 02:23:40 +00:00
Michael Goderbauer
9dd30878d9
Add LookupBoundary to Material (#116736) 2022-12-09 15:48:00 -08:00
Callum Moffat
73cb7c2fc5
Squashed MediaQuery InheritedModel (#114459) 2022-12-09 20:59:11 +00:00
Taha Tesser
e57b7f4ea8
Add Material 3 support for ListTile - Part 1 (#116194)
* Add Material 3 support for `ListTile` - Part 1

* minor refactor

* Add `useMaterial3: false` to M2 tests
2022-12-09 20:05:12 +00:00
hangyu
003608f182
Update text field input width when there are prefix/suffix icons (#116690)
* Update input_decorator_test.dart

Update input_decorator.dart

Update input_decorator.dart

Update input_decorator.dart

Update input_decorator.dart

Update input_decorator.dart

Revert "Update input_decorator.dart"

This reverts commit 6a6d2fd0c145c15440405060190ef714b78441c9.

Update input_decorator.dart

Update input_decorator_test.dart

Update input_decorator.dart

lint

* Update input_decorator.dart
2022-12-08 10:27:46 -08:00
zmtzawqlp
2ffc5bc17e
Fix wrong position of TabBarIndicator when it's label size and has label padding (#116398) 2022-12-08 17:05:23 +00:00
chunhtai
521028c808
Reland "Use semantics label for backbutton and closebutton for Android" (#116676)
* Reland "Use semantics label for backbutton and closebutton for Android"

This reverts commit cc256c3e33d74ed861640e09e8e21957ddd94c1e.

* Makes the semantics slider test more robust
2022-12-07 21:46:17 +00:00
chunhtai
cc256c3e33
Revert "Use semantics label for backbutton and closebutton for Android" (#116675)
This reverts commit 68ce1aeaeb33ad960fb5195852e4dc66f680d4ff.
2022-12-07 10:33:44 -08:00
chunhtai
68ce1aeaeb
Reland "Use semantics label for backbutton and closebutton for Android" (#115776)
* Reland "Use semantics label for backbutton and closebutton for Android"

This reverts commit 20a78ed69f45502344010aedff4d915db27072b2.

* change to default target platform
2022-12-07 18:03:17 +00:00
chunhtai
352ad3a9ef
Adds API in semanticsconfiguration to decide how to merge child semanticsConfigurations (#110730)
* Adds semantics merger API and fix input decorator

* addressing comments

* abstractnode to object

* feature complete

* addressing comments

* fix comments

* conditionally add sort order

* fix bool

* fix test

* more fix

* fix tests
2022-12-07 16:59:16 +00:00
harperl-lgtm
a570fd25d8
Date picker special labeling for currentDate with localization and te… (#116433)
* Date picker special labeling for currentDate with localization and tests.

* Updated CalendarDatePicker semantics test

* removed recursive import

* changed labeling for current date to be less verbose
2022-12-07 09:21:44 -05:00
Greg Spencer
577a88b222
Fix MenuAnchor padding (#116573)
* Fix MenuAnchor padding

* Add tests
2022-12-06 21:30:25 +00:00
Eilidh Southren
22cbef3050
[CP] Fix Snackbar TalkBack regression (#116417)
* Add M2 defaults and template skeleton

* add MaterialStateColor functionality to ActionTextColor (issue #110402)

* Add M2 defaults and template skeleton

* updated material 3 tokens

* Updated snackbar demo

* add theme tests

* add gen defaults

* formatting

* more whitespace fixes

* add widget type

* update docs

* code review changes

* Add line overflow functionality

* whitespace fixes

* update M3 animation

* whitespace fixes

* add insetPadding param

* Modifed icon parameter to showCloseIcon

* white space fixes

* test fixes

* rename iconColor to closeIconColor

* debug test fix

* de-britishification

* g3fix

* g3fix

* debug test fix

* Fix Snackbar talkback regression

* fix merge weirdness

* test fix

* fix linux analysis error

* fix linux analysis error

* fix linux analysis error

* fix linux analysis error

* fix linux analysis error

* fix linux analysis error
2022-12-02 20:17:20 +00:00
Qun Cheng
6bb412e35e
Added controller and onSelected properties to DropdownMenu (#116259) 2022-11-30 16:58:21 -08:00
Casey Hillers
d2af134578
Revert "Fix Slider semantic node size (#115285)" (#116294)
This reverts commit 8473da22cde2fcedd51af654822cac83a9b5ecb5.
2022-11-30 11:21:39 -08:00
Eilidh Southren
29422d25fe
M3 snackbar [re-land] (#116218)
* Add M2 defaults and template skeleton

* add MaterialStateColor functionality to ActionTextColor (issue #110402)

* Add M2 defaults and template skeleton

* updated material 3 tokens

* Updated snackbar demo

* add theme tests

* add gen defaults

* formatting

* more whitespace fixes

* add widget type

* update docs

* code review changes

* Add line overflow functionality

* whitespace fixes

* update M3 animation

* whitespace fixes

* add insetPadding param

* Modifed icon parameter to showCloseIcon

* white space fixes

* test fixes

* rename iconColor to closeIconColor

* debug test fix

* de-britishification

* g3fix

* g3fix

* debug test fix
2022-11-30 19:13:00 +00:00
Taha Tesser
a52293843c
[Reland] Add Material 3 support for TabBar (#116283)
* Add Material 3 support for `TabBar`

* M3 `TabBar` revert fix and tests
2022-11-30 17:58:07 +00:00
Pierre-Louis
b2672fe835
Revert "Add Material 3 support for TabBar (#116110)" (#116273)
This reverts commit 900b395451bb29748b07ac45467b93b2f5490102.
2022-11-30 13:20:19 +00:00
Taha Tesser
8473da22cd
Fix Slider semantic node size (#115285) 2022-11-30 02:27:45 +00:00
Darren Austin
322dd06d6e
Updated the M3 textTheme to use onSurface color for all styles. (#116125) 2022-11-29 18:03:33 -08:00