11570 Commits

Author SHA1 Message Date
Callum Moffat
7ddf42eae5
InteractiveViewer parameter to return to pre-3.3 trackpad/Magic Mouse behaviour (#114280)
* trackpadPanShouldActAsZoom

* Address feedback

* Move constant, add blank lines
2023-01-06 22:44:44 +00:00
Morris Kurz
e0f89e7b72
Fix out-of-sync ExpansionPanel animation (#105024)
* Increase minimum height of headerWidget in ExpansionPanel to smooth the animation.

Signed-off-by: Morris Kurz <morriskurz@gmail.com>

* Add regression tests that check for equal height of header elements in ExpansionPanel.

Signed-off-by: Morris Kurz <morriskurz@gmail.com>

* Clarify comment.

Signed-off-by: Morris Kurz <morriskurz@gmail.com>

* Reduce padding in ExpandIcon to 12px s.t. header height is 48px.

Signed-off-by: Morris Kurz <morriskurz@gmail.com>

* Update testcases to new header height (56px -> 48px).

Signed-off-by: Morris Kurz <morriskurz@gmail.com>

* Test for header height equal to 48px.

Signed-off-by: Morris Kurz <morriskurz@gmail.com>

* Change issue number to link in comment

* Add periods to comments

Signed-off-by: Morris Kurz <morriskurz@gmail.com>
2023-01-06 22:40:51 +00:00
Alex Wallen
6d7c5077ca
Update docstring (#118072)
Co-authored-by: a-wallen <stephenwallen@google.com>
2023-01-06 22:40:48 +00:00
Mohammed CHAHBOUN
507062032f
Added expandIconColor property on ExpansionPanelList Widget (#115950)
* Create expanIconColor doc template

* Add expandIconColor property to ExpansionPanelList

* Added tests for expandIconColor on ExpansionPanelList & radio

* Removed trailing spaces
2023-01-06 00:13:18 +00:00
Jason Simmons
4f3ed80400
Remove doc reference to the deprecated ui.FlutterWindow API (#118064) 2023-01-06 00:06:11 +00:00
LongCatIsLooong
0a2e0a4730
Avoid using TextAffinity in TextBoundary (#117446)
* Avoid affinity like the plague

* ignore lint

* clean up

* fix test

* review

* Move wordboundary to text painter

* docs

* fix tests
2023-01-05 17:04:15 +00:00
Callum Moffat
c53501d835
Send text direction in selection rects (#117436) 2023-01-04 04:00:08 +00:00
Sam Rawlins
63653e8272
== override parameters are non-nullable (#117839) 2023-01-04 01:13:21 +00:00
Renzo Olivares
9080d1acc5
Reland "Add support for double tap and drag for text selection #109573" (#117502)
* Revert "Revert "Add support for double tap and drag for text selection (#109573)" (#117497)"

This reverts commit 39fa0117a919bd401c4c8734c97ddb46fbc45cb7.

* Allow TapAndDragGestureRecognizer to accept pointer events from any devices -- the TapGestureRecognizer it replaces was previously doing this

Co-authored-by: Renzo Olivares <roliv@google.com>
2023-01-04 00:54:10 +00:00
Tae Hyung Kim
a7942e80d4
Add convenience constructors for SliverList (#116605)
* init

* lint

* add the other two slivers

* fix lint

* add test for sliverlist.separated

* add3 more

* fix lint and tests

* remove trailing spaces

* remove trailing spaces 2

* fix lint

* fix lint again
2023-01-03 22:33:55 +00:00
Greg Price
6b9f1c228a
Minor documentation fix on BorderRadiusDirectional.zero (#117661) 2023-01-03 22:26:23 +00:00
Michael Goderbauer
fdc25a1700
Reland "Remove single-view assumption from ScrollPhysics (#117503)" (#117916)
This reverts commit c956121ac098b91061bfc0a93c930121ff3279ba.
2023-01-03 21:34:08 +00:00
Darren Austin
ccfd14b05f
Updated to tokens v0.150. (#117350)
* Updated to tokens v0.150.

* Updated with a reverted list_tile.dart.
2023-01-03 20:48:00 +00:00
Xilai Zhang
c089c19f16
Revert "[reland] Add Material 3 support for ListTile - Part 1 (#116963)" (#117756)
This reverts commit 57fb36ee0ad1b2203698e47abf01e68cf1e558e6.
2022-12-29 05:36:21 +00:00
Eilidh Southren
0e83ada593
Update M3 IconButton unselected focused opacity (#117321)
* Bottom App Bar M3 background color fix

* update test

* test update

* remove whitespace

* Update IconButton unselected focused opacity

* Delete generated_plugins.cmake
2022-12-28 20:34:42 +00:00
Xilai Zhang
c956121ac0
Revert "Remove single-view assumption from ScrollPhysics (#117503)" (#117647)
This reverts commit 999356b776f70132d569a37f13f65333a1bb0779.
2022-12-27 21:22:16 +00:00
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
Justin McCandless
6781576e80
Reland iOS 16 context menu (#117234)
Updates the iOS text selection toolbar to look like iOS 16 (reland)
2022-12-22 15:55:28 -08:00
Justin McCandless
08209b7e0b
Explain how to test onSubmitted in its docs (#117550)
* Explain how to test onSubmitted

* Fix analyzer saying tester is undefined
2022-12-22 22:46:09 +00:00
Michael Goderbauer
6eb002a167
Reland "Remove single-view assumption from widgets library (#117480)" (#117549)
* Revert "Revert "Remove single-view assumption from widgets library (#117480)" (#117545)"

This reverts commit b8d5d9c46ca084a707caa1e994d896cb977662d2.

* check for mounted
2022-12-22 22:05:25 +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
Michael Goderbauer
b8d5d9c46c
Revert "Remove single-view assumption from widgets library (#117480)" (#117545)
This reverts commit b8b3567130c75dd77cf85cbf8b73037cc2a5f0e7.
2022-12-22 18:52:58 +00:00
Michael Goderbauer
b8b3567130
Remove single-view assumption from widgets library (#117480) 2022-12-21 23:49:18 +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
2931e50c30
Handle the case of no selection rects (#117419)
Fixes an error that can occur when selection contains a partial glyph.
2022-12-21 15:26:19 -08: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
alanwutang11
1970bc919b
cacheWidth cacheHeight support for canvaskit on web (#117423)
* cacheWidth cacheHeight support for web canvaskit

* comments

* clarifying comment for loadTestImageProvider class

Co-authored-by: alanwutang11 <alpwu@google.com>
2022-12-21 21:06:06 +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
fdd2d7d64a
Sync analysis_options.yaml & cleanups (#117327) 2022-12-20 14:15:39 -08:00
Michael Goderbauer
81bc54be75
Enable use_colored_box lint (#117370) 2022-12-20 14:09:55 -08:00
Flutter GitHub Bot
4591f057fb
roll packages (#117357) 2022-12-20 22:04:23 +00:00
Michael Goderbauer
0220afdd3e
enable use_enums (#117376) 2022-12-20 20:06:24 +00: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
Ondrej Simek
8289ea624e
Move a comment where it belongs (#117385) 2022-12-20 17:07:31 +00:00
Zachary Anderson
c64dcbefa6
Revert "Manual roll Flutter Engine from 339791f190fa to 7ee3bf518036 (1 revision) #117367 (#117372)" (#117396)
This reverts commit 61fb6ea2d5dd6f6fd3c3758364b0272270691516.
2022-12-20 09:04:05 -08:00
Siva
61fb6ea2d5
Manual roll Flutter Engine from 339791f190fa to 7ee3bf518036 (1 revision) #117367 (#117372) 2022-12-20 08:31:22 -08: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
Michael Goderbauer
1adc27503f
Bump min SDK to 2.19.0-0 (#117345)
* Bump min SDK to 2.19.0-0

* fix
2022-12-20 00:46:14 +00: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
alanwutang11
c0dddacb81
Fix is canvas kit bool (#116944)
* isCanvasKit implement and test

* isCanvasKit implement and test

* ++

* forgot license

* make isCanvasKit a getter

* addressed comments

* forgot to change names of integration test files

* typo

* simplified tests

* comments
2022-12-17 23:33:32 -08:00
Lucas.Xu
b20a9e0a37
imporve gesture recognizer semantics test cases (#117257) 2022-12-17 21:00:46 +01: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
htoor3
98e9032ca3
[web] Allow shift + left/right keyboard shortcuts to be handled by framework on web (#117217)
* Remove DoNothing actions for shift + left/right keyboard shorcuts on web and add tests

* Fix spacing

* Add select all left/right cases + tests
2022-12-16 22:12:41 +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