6646 Commits

Author SHA1 Message Date
Greg Spencer
a085635899
Change the way ActionDispatcher is found. (#41245)
This changes the way ActionDispatchers are found by the Actions widget, so that by default it will look for dispatchers of the parent Actions widgets instead of just creating a default ActionDispatcher. This allows overriding of the ActionDispatcher at the top level: before, the custom action dispatcher would only be invoked if explicitly set on all the Actions widgets.

This is not a breaking change because there was a default value to the dispatcher parameter before that performed this function, and not specifying the dispatcher anywhere will still result in a default dispatcher being created.
2019-09-26 14:31:08 -07:00
Greg Spencer
1a7bb1f583
Added proper focus handling when pushing and popping routes (#40166)
The proposed change will change focus handling when pushing and popping routes so that the FocusScopeNode for the route receives focus when pushed, and that the FocusScopeNode in the navigator receives focus when the route is popped.

This means that the last setFirstFocus call on the scope is used to determine which control actually receives focus. When the focus scope receives focus, it traverses its children, trying to find a non-scope node that is the "first focus" of itself or a child node.

This is a breaking change, because the focus behavior has changed. If you push a route after this change, and had a 'first focus' set on a widget via FocusScopeNode.setFirstFocus, it won't currently receive focus immediately, but after this change it will. Similarly, if you pop a route after this change, the focus will go back to where it was before the route was pushed, which is correct, but different from what happens now.
2019-09-26 14:30:39 -07:00
Kristin Ho
034358e341 Prevent PointerEnter[or Exit]Event from erasing event.down value (#40637) (#41332)
* MouseRegion documentation claimed that onEnter and onExit
  would track entry and exit regardless of whether the pointer was
  down or up
* It did such, but when grabbing the value of `event.down` from
  the passed event, the value was always `false`
* PointerEnterEvent and PointerExitEvent were overriding the value
  passed from PointerEvent in constructors, even if the value was true
  e.g. in invocations of .fromMouseEvent((PointerMoveEvent...))
* This change now passes the value along to PointerEnter/ExitEvents
  while providing it a default of false, and updates documentation

Fixes #40637
2019-09-26 13:48:40 -07:00
Greg Spencer
0509791663
Fix mouse hover to not schedule a frame for every mouse move. (#41014)
This fixes the mouse hover code to not schedule frames with every mouse move.

Before this, it would schedule a post frame callback, and then schedule a frame immediately, even if there was nothing that needed to be updated. Now it will schedule checks for mouse position updates synchronously, unless there's a new annotation, and skip scheduling a new frame in all cases. It has to be async in the case of a new annotation (i.e. a new MouseRegion is added), since when the annotation is added, it hasn't yet painted, and it can't hit test against the new layer until after the paint, so in that case it schedules a post frame callback, but since it's already building a frame when it does that, it doesn't need to schedule a frame.

The code also used to do mouse position checks for all mice if only one mouse changed position. I fixed this part too, so that it will only check position for the mouse that changed.
2019-09-26 13:13:42 -07:00
Hans Muller
e47a1dc216
Dropdown Menu layout respects menu items intrinsic sizes (#41120) 2019-09-26 07:18:25 -07:00
Nurhan Turgut
ae529d8be0
Fixing the editable_text unit tests by clearing the log. Add a modification for also testing cached size. (#41300) 2019-09-25 13:14:59 -07:00
Alexandre Ardhuin
9c6f11d5d1
fix bad indentation (#41263) 2019-09-25 20:24:57 +02:00
LongCatIsLooong
deb4184f63
Remove CupertinoSystemColors in favor of CupertinoColors (#40566) 2019-09-25 10:17:37 -07:00
LongCatIsLooong
7bf9aea254
Fix user gesture in CupertinoPageRoute (#39590) 2019-09-25 00:37:12 -07:00
LongCatIsLooong
d8ca42e211
CupertinoPageScaffold dark mode (#40690) 2019-09-25 00:31:36 -07:00
imzyy
964dc1fc30 Add fullscreenDialog argument in PageRouteBuilder (#40161) 2019-09-24 16:54:44 -07:00
Hans Muller
09073a08b8
Rebuild modal routes when the value of userGestureInProgress changes (#41150) 2019-09-24 16:03:31 -07:00
Michael Goderbauer
81e693a7fe
Add Sample code to SlideTransition (#41009) 2019-09-24 12:38:45 -07:00
chunhtai
0ca5e71f28
Implement system fonts system channel listener (#38930)
* Implement system fonts system channel listener
2019-09-24 12:29:03 -07:00
Alexandre Ardhuin
b873162194
fix some bad indentations (#41172) 2019-09-24 21:03:37 +02:00
Nurhan Turgut
f6e77a9ee5
Fixing a text editing bug happening when text field changes. (#41108)
* Carrying last size and transform information to TextInputConnection. Doing this we are making sure that the size/transform information from the previous connection will be removed, when connection changes.

* remove unused lastsize and lasttransform values

* Adding unit tests. Adressing comments.
2019-09-24 09:25:39 -07:00
Greg Spencer
0e6cb28dbe
Add fake keyboard key generation to the testing framework (#40706)
There were four or five different implementations in various tests for sendFakeKeyEvent, which roughly all did the same thing. I was going to add yet another one, and decided that it needed to be generalized and centralized. This replaces those instances with something that just takes a LogicalKeyboardKey so that it's self-documenting, and can be used with multiple platforms.

This adds two functions to widget tester: sendKeyDownEvent and sendKeyUpEvent which simulate key up/down from a physical keyboard. It also adds global functions simulateKeyDownEvent and simulateKeyUpEvent that can be called without a widget tester. All are async functions protected by the async guard.
2019-09-24 08:14:38 -07:00
LongCatIsLooong
4815b26d71
Dark mode for CupertinoSwitch and CupertinoScrollbar, Fidelity updates (#40636) 2019-09-24 00:21:44 -07:00
Alexandre Ardhuin
e9965f5636
add missing trailing commas in packages/flutter (#41076) 2019-09-24 08:05:41 +02:00
Michael Goderbauer
961f1b746d
AnimatedBuilder API Doc improvements (#40917) 2019-09-23 10:09:38 -07:00
Alexander Aprelev
bd929c4a52 Revert "Use separate isolate for image loading. (#34188)" (#40984)
This reverts commit b12bdd0ea13619903b9a56164c69e7e62410b723 as it
breaks existing tests that expect image loaded after certaing number of
pupms. With image loading done on separate isolate pumping is not
guaranteed to get image loaded.
2019-09-20 10:23:51 -07:00
gaaclarke
71d75e3e0a
Channel buffers (#40165)
Started reading stored channel messages from ui.channelBuffers when handlers get set.
2019-09-19 16:58:54 -07:00
Jason Simmons
c94a994d62
Handle CR+LF end of line sequences in the license parser (#40718) 2019-09-19 09:44:31 -07:00
chunhtai
0086243be4
Fixed Selectable text align is broken (#40709)
* Fixed Selectable text align is broken
2019-09-19 09:37:00 -07:00
Alexander Aprelev
b12bdd0ea1
Use separate isolate for image loading. (#34188)
* Use separate isolate for image loading. Use TransferableTypedData to const-cost receive bytes from that isolate.
2019-09-18 20:38:54 -07:00
Robin Jespersen
d4a016443b Adding onEnd callback to implicit animated widgets (#38979) 2019-09-18 14:56:18 -07:00
Michael Goderbauer
4373a31971
Reapply "Revert "Propagate textfield character limits to semantics (#40468)" (#40767) 2019-09-18 14:55:37 -07:00
chunhtai
6c457e124b
Material textselection context menu cannot disable select all (#40713) 2019-09-18 12:19:37 -07:00
Justin McCandless
431b82fda8
TextField docs for getting value (#40695)
Added docs examples of getting the string from a TextField
2019-09-18 10:43:23 -07:00
Greg Spencer
110db03f24
Fix a problem with disposing of focus nodes in tab scaffold (#40100)
Previously, focus nodes created in the tab scaffold were not being disposed of properly, causing possible memory leaks. Also, the builder wasn't being passed the right context so that the FocusScope.of operator inside of a builder would find the focus scope for the given tab (it was being passed the context of the overall tab scaffold).
2019-09-17 17:10:18 -07:00
Michael Goderbauer
b4324aed59
Revert "Propagate textfield character limits to semantics (#40468)" (#40714)
This reverts commit 6ad88bd5c01897ee3c5743a99e75350f87388819.
2019-09-17 16:37:11 -07:00
Michael Goderbauer
6ad88bd5c0
Propagate textfield character limits to semantics (#40468) 2019-09-17 14:39:50 -07:00
Kate Lovett
31029f9338
Doc Improvements for SliverFillRemaining (#39088) 2019-09-17 14:21:28 -07:00
Greg Spencer
63e096b4ac
Update keyboard maps (#40697)
This updates the keyboard maps to use updated HID codes for game controller buttons (from Chrome), and to encode that GLFW "super" keys are what we call "meta" keys (i.e. Windows key or Command key).
2019-09-17 13:24:54 -07:00
Michael Goderbauer
8e14fc7f72
New overview for animations library (#40607) 2019-09-17 13:03:15 -07:00
Anthony
c17086a06d
Add the option to configure a chip check mark color (#40608)
Add the option to configure a chip check mark color
2019-09-17 14:17:34 -04:00
xster
fab3eb21c2
Let Material BackButton have a custom onPressed handler (#39600) 2019-09-17 11:09:18 -07:00
Brian Egan
a50eda8f5a Diagrams and samples for Rank 20-30 popular api docs (#40089) 2019-09-17 10:22:28 -07:00
Hans Muller
6d18c20a95
Update PopupMenu layout (#40179) 2019-09-17 08:48:27 -07:00
Alexandre Ardhuin
df4bf453ab
more UI-as-code (#35516) 2019-09-17 16:23:44 +02:00
LongCatIsLooong
390ef60963
CupertinoNavigationBar Dark Mode(#40189) 2019-09-16 14:16:30 -07:00
Gary Qian
67e35d612e
Specify ifTrue and ifFalse for strut FlagProperty (#40609) 2019-09-16 14:08:18 -07:00
Simon Lightfoot
bf216110ff Adds relayout option to CustomMultiChildLayout. (#39252) 2019-09-16 09:22:59 -07:00
Hans Muller
0f00f424fa
ModalRoutes ignore input when a (cupertino) pop transition is underway (#40466) 2019-09-16 08:02:04 -07:00
MH Johnson
0d3bb515f3
[Docs] Create 'center' snippets template (#40367)
* Create 'center' template
2019-09-15 20:38:44 -04:00
Shi-Hao Hong
cf7e7e4529
Implement DropdownButton.selectedItemBuilder (#40461)
* Implement DropdownButton.selectedItemBuilder
2019-09-14 07:56:05 -07:00
LongCatIsLooong
64300123fa
Restore offstage and ticker mode after hero pop and the from hero is null (#40306) 2019-09-13 19:46:58 -07:00
LongCatIsLooong
19b47c2dd4
Dark Mode R: Refresh Control (#40454) 2019-09-13 17:18:20 -07:00
Michael Goderbauer
9d70c85f5a
a11y improvements for textfield (#40390) 2019-09-13 09:23:27 -07:00
Shi-Hao Hong
2bd7f9ff7d
Update ToggleButtons constraints default and add new constraints parameter (#39857)
* Add constraints property, updated default constraints for ToggleButtons to 48x48

* Add kMinInteractiveDimension constant to ToggleButtons
2019-09-13 08:19:06 -07:00