2408 Commits

Author SHA1 Message Date
Pierre-Louis
2aa348b940
Use curly_braces_in_flow_control_structures for widgets (#104609)
* Use `curly_braces_in_flow_control_structures` for `widgets`

* fix comments

* fix comments
2022-05-26 09:48:09 +02:00
Greg Spencer
406d86b4ba
PlatformMenuBar changes to bring it into line with upcoming MenuBar implementation (#104565)
When I was doing the MenuBar implementation, I made some changes to the PlatformMenuBar to allow it to understand shortcuts a little more, and to deprecate the body parameter rename it to child to match most other widgets.

These are those changes, separated out because they are separable, and I'm trying to make the MenuBar PR smaller.
2022-05-25 14:48:28 -07:00
xubaolin
6efdf0ae7b
fix a _DraggableScrollableSheetScrollPosition update bug (#103328) 2022-05-25 14:48:10 -07:00
Kate Lovett
fe04647651
Include forceElevated for scrolledUnder in new SliverAppBar variants (#104536) 2022-05-25 14:23:13 -07:00
Markus Aksli
b05741cbad
Hide the text selection toolbar on mobile when orientation changes (#103512) 2022-05-25 13:03:16 -07:00
Greg Spencer
da24f105bd
Removing Shorcuts.of and Shortctus.maybeOf (#104215)
This removes Shorcuts.of and Shortctus.maybeOf because they're not especially useful, since the only thing you can really set on a ShortcutManager is the shortcuts, and the Shortcuts widget that you give it to manages those, so if it rebuilds, it overwrites what you set.

Also, adds a Shortcuts.manager constructor and removes the manager argument to the Shortcuts widget.

Removing these will also eliminate an InheritedWidget for each Shortcuts widget, improving memory usage.
2022-05-25 10:16:08 -07:00
Michael Goderbauer
d5fbc3750e
Remove unused code from tests (#104550) 2022-05-25 09:38:09 -07:00
Greg Spencer
0a417c3b49
A bunch of cleanups and a missing ShortcutRegistar in WidgetsApp (#104560)
A bunch of random cleanup things I found while doing MenuBar development.

Changes an if test to an assert in binding.dart, since the if should always be true.
Adds the default ShortcutRegistrar that should have been in the ShortcutRegistry PR.
Moves a debug message in the FocusManager to print the result after the focus change instead of before.
Reorders the test parameters in theme_data_test.dart to match the order of the theme data fields everywhere else.
2022-05-25 09:32:46 -07: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
Xilai Zhang
de230d393c
Revert "Add ability for ModalRoutes to ignore pointers during transitions and do so on Cupertino routes (#95757)" (#104520)
This reverts commit 4c0b0be2da5d1ee80c3d713e68ddd88d2cf2e72d.
2022-05-24 11:10:13 -07:00
hellohuanlin
f85209272d
Add Focus support for iOS platform view (#103019) 2022-05-23 17:58:13 -07:00
Casey Hillers
da105b2b24
Revert "[framework] inline AbstractNode into RenderObject" (#104257) 2022-05-20 11:43:11 -07:00
Renzo Olivares
b876f78ea5
Desktop platforms should not collapse selection on copy (#104209)
* Add tests

* fix tests

* updates

Co-authored-by: Renzo Olivares <roliv@google.com>
2022-05-19 20:52:50 -07:00
Tong Mu
23bc3d64eb
[Mouse] Remove all pointers at the end of tests (#102694) 2022-05-19 17:48:10 -07:00
Will Lockwood
4c0b0be2da
Add ability for ModalRoutes to ignore pointers during transitions and do so on Cupertino routes (#95757) 2022-05-19 15:33:12 -07:00
Jonah Williams
24bd28f696
[framework] inline AbstractNode into RenderObject (#103832) 2022-05-19 14:28:09 -07:00
Greg Spencer
f6c3ee310f
Add ShortcutsRegistry (#103456)
This adds a ShortcutsRegistry for ShortcutActivator to Intent mappings that can be modified from its descendants.

This is so that descendants can make shortcuts dynamically available to a larger portion of the app than just their descendants. This is a precursor needed by the new MenuBar, for instance, so that the menu bar itself can be placed where it likes, but the shortcuts it defines can be in effect for most, if not all, of the UI surface in the app. For example, the "Ctrl-Q" quit binding would need to work even if the focused widget wasn't a child of the MenuBar.

This just provides the shortcut to intent mapping, the actions activated by the intent are described in the context where they make sense. For example, defining a "Ctrl-C" shortcut mapped to a "CopyIntent" should perform different functions if it happens while a TextField has focus vs when a drawing has focus, so those different areas would need to define different actions mapped to "CopyIntent". A hypothetical "QuitIntent" would probably be active for the entire app, so would be mapped in an Actions widget near the top of the hierarchy.
2022-05-19 13:17:42 -07:00
xubaolin
93211a48d7
[Scrollbar]Skip the ScrollPosition check if the bar was unmounted (#103948) 2022-05-18 20:12:10 -07:00
Justin McCandless
715fcaac72
Can't drag the cursor with the mouse (#103002) 2022-05-18 17:32:12 -07:00
Justin McCandless
8f7e41a94c
Some MacOS control key shortcuts (#103936) 2022-05-18 13:37:12 -07:00
Dan Field
1662a14bc8
More missing clipBehavior respects (#103931) 2022-05-17 11:32:11 -07:00
Greg Spencer
1994027986
Add VoidCallbackAction and VoidCallbackIntent (#103518)
This adds a simple VoidCallbackAction and VoidCallbackIntent that allows configuring an intent that will invoke a void callback when the intent is sent to the action subsystem. This allows binding a shortcut directly to a void callback in a Shortcuts widget.

I also added an instance of VoidCallbackAction to the default actions so that simply binding a shortcut to a VoidCallbackIntent works anywhere in the app, and you don't need to add a VoidCallbackAction at the top of your app to make it work.
2022-05-17 11:11:41 -07:00
Jason Simmons
275fb0286c
Fix avoid_redundant_argument_values analyzer warnings enabled in the latest Dart SDK (#103734)
See https://github.com/flutter/flutter/pull/103719
2022-05-13 12:57:59 -07:00
chunhtai
533816d116
Refactor web text editing shortcuts (#103377) 2022-05-12 13:09:06 -07:00
xubaolin
d29ccad6fb
fix SliverReorderableList not work on Android platform bug (#103406) 2022-05-10 21:09:04 -07:00
Renzo Olivares
c411065b01
Fix selection not deselected when TextField loses focus (#103424) 2022-05-10 17:34:07 -07:00
xubaolin
4bed76757d
Fix a _WrappedScrollBehavior.shouldNotify bug (#103267) 2022-05-07 11:44:08 -07:00
chunhtai
7cdcfb2a88
DefaultTextEditingShortcuts should use meta-based shortcut for iOS (#103077) 2022-05-05 15:39:12 -07:00
Casey Hillers
603eb82734
Revert "Fix jumping when doing long press for selecting text" (#103141) 2022-05-05 12:39:09 -07:00
Bruno Leroux
750ad32870
Fix DraggableScrollableSheet leaks Ticker (#102916) 2022-05-05 01:29:07 -07:00
fzyzcjy
896e5b332d
(Test-only) Add tests for new ImageFilter.dilate/ImageFilter.erode in flutter engine (#101036) 2022-05-03 16:04:07 -07:00
Jonah Williams
8147bdbb5c
partial revert of repaint boundary change (#102962) 2022-05-03 14:09:07 -07:00
chunhtai
f86d108988
Adds RouterConfig to simply API (#102786) 2022-04-29 18:59:06 -07:00
Zachary Anderson
02b300d99e
Revert "delete fast reassemble code (#102842)" (#102856)
This reverts commit ec8693e80bf2c9f31c06d9832ebb4bccc5274440.
2022-04-29 16:41:37 -07:00
Jonah Williams
ec8693e80b
delete fast reassemble code (#102842) 2022-04-29 15:04:08 -07:00
LongCatIsLooong
0b3c5d1228
Defer the OverlayEntry listenable disposal until its widget is unmounted (#102794) 2022-04-29 12:49:08 -07:00
Taha Tesser
eef4aa7caa
Hero: Add an example for createRectTween (#102650) 2022-04-29 12:39:09 -07:00
chunhtai
5b71314740
Add RouteInformationParser.parseRouteInformationWithDependencies (#102414) 2022-04-28 17:04:04 -07:00
Phil Quitslund
bca071815f
rename local functions with _s (#102615) 2022-04-27 09:14:57 -07:00
Alexandre Ardhuin
07f1c20474
add missing trailing commas in list/set/map literals (#102585) 2022-04-27 09:15:35 +02:00
Jonah Williams
fba9214d11
[framework] remove usage and deprecate physical model layer (#102274) 2022-04-26 16:14:04 -07:00
Jonah Williams
0cb5772e73
[framework] allow other RenderObjects to behave like repaint boundaries (#101952) 2022-04-26 10:19:09 -07:00
Bruno Leroux
bc7d3bbc65
Fix DraggableScrollableController.animateTo leaks Ticker (#102504) 2022-04-26 02:24:05 -07:00
Jonah Williams
f15295cc91
[framework] allow disabling image filter layer (#102085) 2022-04-25 17:44:07 -07:00
gaaclarke
18713e0c5d
Made Directionality forego dependency tracking for better performance. (#102336) 2022-04-25 15:39:05 -07:00
wangying
899548c48a
Assign debugCreator for more layers (#101899) 2022-04-25 10:04:07 -07:00
rgevrek
6ea4aef827
Fix jumping when doing long press for selecting text (#102270) 2022-04-22 15:19:06 -07:00
chunhtai
2ebc7bee9c
Adds tooltip to semantics node (#87684) 2022-04-21 12:14:09 -07:00
Taha Tesser
e4edcbceb3
Improve 'NestedScrollView and internal scrolling' test to account for all the inner children layers (#102309) 2022-04-21 10:39:09 -07:00
xubaolin
e5beafaf36
Expose ignoringPointer property for Draggable and LongPressDraggable (#100475) 2022-04-19 13:29:28 -05:00