6679 Commits

Author SHA1 Message Date
Rody Davis
b730a993c1 Fix CupertinoTextField and TextField ToolbarOptions not changing (#40665) 2019-10-04 11:22:57 -07:00
krisgiesing
0e605cc4dd Revert "Fix ReorderableListView's use of child keys (#41334) (#41338)" (#41931)
This reverts commit 2b138fd7d20caa552a50e8f6dfdba0017099a7be.
2019-10-04 07:52:15 -07:00
Erick Ghaumez
62ae5883a8 Fix 'popupTheme' variable name in a MaterialBannerTheme method (#41632) 2019-10-04 22:42:09 +08:00
Alexandre Ardhuin
890b939401
indent formal parameters correctly (#41644) 2019-10-04 11:00:18 +02:00
Greg Spencer
3e2dc8ca7b Revert ActivateAction PR (#41945) 2019-10-03 20:27:37 -07:00
LongCatIsLooong
97d191de13
Fix CupertinoActivityIndicator radius (#41892) 2019-10-03 18:37:57 -07:00
Tong Mu
297fe91f51
Refactor: Make MouseTracker test concise with some utility functions (#41791)
* Extract pointerData and _equalToEventsOnCriticalFields for simplicity
2019-10-03 16:33:31 -07:00
Mehmet Fidanboylu
6b09543e3a Allow customization of label styles for semantics debugger (#41730) 2019-10-03 11:11:13 -07:00
Gary Qian
fa7340a328
Return WidgetSpans from getSpanForPosition (#40635) 2019-10-02 19:04:50 -04:00
Shi-Hao Hong
27a12efabf
Update DefaultTabController to allow for zero tabs (#41625)
* Update DefaultTabController to allow for zero tabs
2019-10-03 06:42:22 +08:00
Shi-Hao Hong
913aca22b3
[Material] Fix Tooltip to respect ambient Directionality (#41629)
* Fix Tooltip Directionality

* Add regression test comment for tooltip directionality fix
2019-10-03 06:41:23 +08:00
Shi-Hao Hong
e7947c3e92
DropdownButton.style API doc example for differing button and menu item text styles (#41650)
* Add dropdown button style doc example for unique text styles
2019-10-03 06:41:00 +08:00
gaaclarke
75c07ef1a6
Updated the docstring for SystemNavigator.pop.
It had an Android bias and was incorrect for iOS.
2019-10-02 15:36:07 -07:00
Josh
8b9e144e6a Added notice to docs that setPreferredOrientations does not always work on iPad (#40743) 2019-10-02 15:32:52 -07:00
Ori Schwartz
f8310d89e8 Use EdgeInsetsGeometry instead of EdgeInsets (#40775) 2019-10-02 15:31:39 -07:00
Tong Mu
0b0942a60c
Refactor: Base tap gesture recognizer (#41329)
* Extracts the logic of TapGestureRecognizer into an abstract class BaseTapGestureRecognizer
* Fixes ModalBarrier unable to dismiss when competing
2019-10-02 15:28:55 -07:00
Greg Spencer
bedf46d06e
Add shortcuts and actions for default focus traversal (#40186)
This adds the default shortcuts and actions for keyboard-based focus traversal of apps.

This list of shortcuts includes shortcuts for TAB, SHIFT TAB, RIGHT_ARROW, LEFT_ARROW, UP_ARROW, DOWN_ARROW, and the four DPAD keys for game controllers (because the DPAD produces arrow key events).

It doesn't yet include functionality for triggering a control (e.g. SPACE, ENTER, or controller buttons), because that involves restructuring some of the Flutter controls to trigger animations differently, and so will be done in another PR (#41220)
2019-10-02 15:21:45 -07:00
Yegor
33f4f8e6df
run services tests on the Web (#41806) 2019-10-02 15:11:22 -07:00
Greg Spencer
4512a1c1b7
Add an ActivateAction to controls that use InkWell. (#41220)
Adds an ActivateAction to controls that use InkWell. Make InkWell host the Focus for those controls, and add the top level binding to the ENTER key. This will make it possible to trigger a button using the enter key, and to get an ink response when the button is triggered.

This is a breaking change because it moves the Focus widget into the InkWell. If you have a component that uses the InkWell directly and you used to wrap that InkWell in a Focus widget to give it its notion of focus, it will now not look for that Focus ancestor for its focus state anymore. In order to control focus on the InkWell, you need to give it a FocusNode directly, via the new focusNode parameter. This should not affect users of widgets like OutlineButton or FloatingActionButton and the like, since those have been modified in this PR.
2019-10-02 12:46:02 -07:00
Mouad Debbar
e045ef2969
Keymap for Web (#41397) 2019-10-01 14:10:53 -07:00
Slade Capasso
a9c28d5f6c
range_slider_test.dart diagnostics property tests (#40291)
* Updates to slider_test.dart

Fixed error that required onChanged.

* Updated slider.dart and slider_test.dart debugFillProperties

Updated slider.dart debugFillProperties to include all properties and slider_test debugFillProperties to test all properties

* Updated Slider onChanged property

* Updated debugFillProperties to ignore testing methods that are null in test

Per feedback from Hans/Anthony on Flutter Material

* Updated spacing in debugFillProperties

Per feedback from Hans

* Updated range_slider.dart and range_slider_test.dart to have DiagnosticProperties tests for all properties

* Updated range_slider.dart and range_slider_test.dart per feedback

Preventing null labels from creating an error.

Added made RangeLabels and RangeValues constants in instantiation of Range Slider.

Fixed spacing.

* Updates to start and end labels in diagnostic property tests

Updated per feedback from @clocksmith
2019-10-01 17:06:34 -04:00
Alexandre Ardhuin
f0553ba58e
Missing trailing commas (#41473)
* add missing trailing commas

* add more missing trailing commas

* add more and more missing trailing commas
2019-09-30 18:48:23 +02:00
Justin McCandless
67ea92cbca
Fix exception when selecting in TextField (#41326) 2019-09-30 09:24:30 -07:00
Erick Ghaumez
d122f09959 Fix the ThemeData.copyWith toggleButtonsTheme argument type (#40994)
* set the copyWith toggleButtonsTheme argument type to ToggleButtonsThemeData

* add a ThemeData.copyWith test
2019-09-30 23:52:35 +08:00
Greg Spencer
0223565fd5
Reland changes to Intent.doNothing to avoid analyzer issue (#41477)
This re-lands #41417 with a slight change that will hopefully not tickle the analyzer as it did before. The last time I tried to land this, the analyzer succeeded for the analyze step in Cirrus, and locally, but failed in an integration test.
2019-09-28 08:55:47 -07:00
MH Johnson
f4ba8d1a93
[Material] Remove text ripple from TextFields (#41320)
* remove splash logic

* update tests
2019-09-28 11:47:17 -04:00
LongCatIsLooong
5f9c262e66
Revert "CupertinoDatePicker & CupertinoTimerPicker dark mode (#39919)" (#41521) 2019-09-27 17:46:15 -07:00
LongCatIsLooong
97b27fafd4
CupertinoDatePicker & CupertinoTimerPicker dark mode (#39919) 2019-09-27 16:03:51 -07:00
krisgiesing
2b138fd7d2
Fix ReorderableListView's use of child keys (#41334) (#41338)
ReorderableListView was constructing a GlobalObjectKey using
the child key as the value. This only had the intended behavior
if the child key was identical across build method invocations.

The new strategy is to scope the child key's value to the
State object's identity, allowing child keys to have value
compare semantics while disambiguating among different list view
instances.
2019-09-27 10:48:42 -07:00
Alexandre Ardhuin
f11c34109c
fix bad indentations(mainly around collection literals) (#41355) 2019-09-27 10:46:45 +02:00
Greg Spencer
957d839775
Revert "Address previous comments, fix Intent.doNothing. (#41417)" (#41449)
This reverts commit eb3e2f559f2563a0878d19bd997629ce07becd3c because of a suspected analyzer bug.  Reverting to investigate.
2019-09-26 22:45:21 -07:00
Greg Spencer
eb3e2f559f
Address previous comments, fix Intent.doNothing. (#41417)
This addresses comments in the original PR (#41245) that introduced Intent.doNothing, adds tests, and fixes an issue with it.
2019-09-26 19:54:28 -07:00
Hans Muller
ecc4764fe2
Revert "Dropdown Menu layout respects menu items intrinsic sizes (#41120)" (#41422)
This reverts commit e47a1dc21613d67a2e2e13c4b81f98c98ee5d4f3.
2019-09-26 17:57:08 -07:00
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