2322 Commits

Author SHA1 Message Date
chunhtai
5c5ddd1fc2
Revert "Fix 25807: implement move for sliver multibox widget (#29188)" (#31497)
This reverts commit 77ab0b83214792e8e6117295982c9397e03193a2.
2019-04-23 10:41:19 -07:00
Greg Spencer
590cc27b31
Revert "Implement focus traversal for desktop platforms, shoehorn edition. (#30040)" (#31461)
This reverts commit 4218c0bc38bc74a97b1b03d7b8b7f0ce32e29468.
2019-04-22 18:02:35 -07:00
Tong Mu
0fb6a05054
PointerDownEvent and PointerMoveEvent default buttons to 1 (#30579)
* Down and Move have default buttons = kPrimary.
2019-04-22 10:15:26 -07:00
Greg Spencer
4218c0bc38
Implement focus traversal for desktop platforms, shoehorn edition. (#30040)
Implements focus traversal for desktop platforms, including re-implementing the existing focus manager and focus tree.

This implements a Focus widget that can be put into a widget tree to allow input focus to be given to a particular part of a widget tree.

It incorporates with the existing FocusScope and FocusNode infrastructure, and has minimal breakage to the API, although FocusScope.reparentIfNeeded is removed, replaced by a call to FocusAttachment.reparent(), so this is a breaking change:

FocusScopeNodes must now be attached to the focus tree using FocusScopeNode.attach, which takes a context and an optional onKey callback, and returns a FocusAttachment that should be kept by the widget that hosts the FocusScopeNode. This is necessary because of the need to make sure that the focus tree reflects the widget hierarchy.

Callers that used to call FocusScope(context).reparentIfNeeded in their build method will call reparent  on a FocusAttachment instead, which they will obtain by calling FocusScopeNode.attach in their initState method. Widgets that own FocusNodes will need to call dispose on the focus node in their dispose method.

Addresses #11344, #1608, #13264, and #1678
Fixes #30084
Fixes #26704
2019-04-22 09:51:40 -07:00
Dan Field
37bc48f26e
rectMoreOrLess equals, prep for 64bit rects (#30942)
* rectMoreOrLess equals, prep for 64bit rects
2019-04-22 09:40:19 -07:00
chunhtai
77ab0b8321
Fix 25807: implement move for sliver multibox widget (#29188) 2019-04-22 09:28:53 -07:00
Justin McCandless
6e1b143fed
Text field scroll physics (#31088)
TextField and CupertinoTextField can now specify scrollPhysics. Cupertino defaults to bouncing now.
2019-04-22 07:42:59 -07:00
MH Johnson
0545c63b9b
Revert "[Material] Update slider and slider theme with new sizes, shapes, and color mappings (#30390)" (#31339)
This reverts commit b1039f0f1b761b0e4ec1825eed269b10af6104d4.

(This is a temporary revert while some of our customers deal with the breaking changes involved.)
2019-04-19 20:41:32 -04:00
Anthony
b1039f0f1b
[Material] Update slider and slider theme with new sizes, shapes, and color mappings (#30390)
This PR makes a number of changes to the visual appearance of material sliders:

Sizes/Shapes
** enabled thumb radius from 6 to 10
** disabled thumb radius from 4 to 10 with no gap
** default track shape is a rounded rect rather than a rect
**
Colors
** all of the colors now use the new color scheme
** overlay opacity has been reduce from 16% to 12%
** value indicator text color now respects the indicator it is on by using onPrimary
** disabledThumb color no respects the surface it is on by using onSurface
The slider theme is also now constructed consistently with other theme objects within the ThemeData. By default, all values are null, and have default values that are resolved in the slider itself, rather than in the slider theme.
2019-04-18 17:02:17 -04:00
Efthymis Sarmpanis
2e6edaf49d Adds Tap Header Feature to ExpansionPanelList (#29390) 2019-04-18 13:53:55 -07:00
Gary Qian
3c8e3b097f
Use full height of the glyph for caret height on Android v2 (#31210)
Will cause golden and Scuba changes. Caret will become taller and shift upwards by 2 pixels.
2019-04-17 15:50:03 -07:00
xster
1c332caed5
Commit a navigator.pop as soon as the back swipe is lifted (#30422) 2019-04-17 13:53:14 -07:00
Todd Volkert
a4ab0321ad
Rename Border.uniform() -> Border.fromSide() (#30792) 2019-04-17 10:58:42 -07:00
Gary Qian
0f5de8725e
Revert "Use full height of the glyph for caret height on Android" (#31159)
* Revert "Use full height of the glyph for caret height on Android (#30991)"

This reverts commit 96e1fc9c34a2c3a11e0dd98ceccb6fbea7ce3460.
2019-04-16 16:49:39 -07:00
Gary Qian
96e1fc9c34
Use full height of the glyph for caret height on Android (#30991) 2019-04-16 10:42:36 -07:00
Tom Robiquet
4ef0292790 Added opacity to cupertino switch when disabled (#29451) 2019-04-15 20:58:03 -07:00
xster
364d73c7d8
Make CupertinoNavigationBarBackButton correctly return an assert error (#30815) 2019-04-15 15:33:33 -07:00
Dan Field
330dc94c0f Check that ErrorWidget.builder is not modified after test (#30898) 2019-04-15 12:38:51 -07:00
Emily Fortuna
ce6fbcea20
Allow mouse hover to only respond to some mouse events but not all. (#30886)
* Allow mouse hover to only respond to some mouse events but not all.
2019-04-11 16:29:21 -07:00
chunhtai
fbeb5e0cf5
Fix issue 23527: Exception: RenderViewport exceeded its maximum number of layout cycles (#30809) 2019-04-11 16:23:11 -07:00
Greg Spencer
8bea3fb2eb
Keep hover annotation layers in sync with the mouse detector. (#30829)
Adds a paint after detaching/attaching hover annotations to keep the annotation layers in sync with the annotations attached to the mouse detector.

Fixes #30744
2019-04-11 13:11:22 -07:00
Siva
e7c7a58d5d
Use identical instead of '==' in a constant expression. (#30921)
* Use identical instead of '==' in a constant expression.

* Fix analyzer warnings.

* Fix analyzer warnings.
2019-04-11 13:08:00 -07:00
Justin McCandless
ecb468f335
Baseline Aligned Row (#30746)
Text in a baseline aligned row now works, and the height of the row is properly calculated.
2019-04-11 09:32:22 -07:00
MH Johnson
3bbb8d8b77
[Material] Fix showDialog crasher caused by old contexts (#30754)
* Fix bug, add regression test.

* remove unnecessary space
2019-04-11 09:48:35 -04:00
Dan Field
42d3464d2e
Let sliver.dart _createErrorWidget work with other Widgets (#30880)
Credit to @ymback
2019-04-11 00:31:06 -07:00
LongCatIsLooong
1a3201bc74
CupertinoDatePicker initialDateTime accounts for minuteInterval (#30862)
initialDateTime should account for minuteInterval
2019-04-10 20:14:35 -07:00
LongCatIsLooong
b8a1870d92
add golden tests for CupertinoDatePicker (#30828)
Add golden tests for CupertinoDatePicker
2019-04-10 19:46:23 -07:00
champeauxr
a5dd074b0d Fixed Table flex column layout error #30437 (#30470)
RenderTable._computeColumnWidths() had a logic error that caused flex columns to be collapsed to their minimum widths in certain situations dependent on the layout width constraint and the number of flex columns.
2019-04-10 18:53:27 -07:00
Dan Field
d2790bd2bb
Check for invalid elevations (#30215)
* Check for invalid elevation usage in the layer tree
2019-04-10 14:57:46 -07:00
Sam Rawlins
83ddd98849 Fix additional @mustCallSuper indirect overrides and mixins (#30667) 2019-04-10 14:54:51 -07:00
Todd Volkert
499004779b
Revert "Add Form.onSaved (#30643)" (#30793)
This reverts commit 949023b27686fb80a0047157490d6c4c61995cef.
2019-04-10 14:49:10 -07:00
Jonah Williams
f66ee3e470
Add semanticsLabel parameter to TextSpan (#30837) 2019-04-10 12:24:01 -07:00
Justin McCandless
ed91a3be49
Fix cursor outside of input width (#30525)
* Disallow cursor from appearing beyond the width of the input.

* Test that verifies the cursor can't exceed the width of the input

* Use constant from editable.dart to explain 1 pixel difference in test

* Fix failing test that tested the case of overflowing spaces
2019-04-10 10:35:03 -05:00
Jonah Williams
03817a995a
fix cast NPE in invokeListMethod and invokeMapMathod (#30760) 2019-04-09 07:22:25 -07:00
Todd Volkert
0b8403b61c
Add const Border.uniform() (#30640)
`Border.all()` is a factory constructor and thus not const
constructible. This change adds a `const Border.uniform()`
constructor and makes `Border.all()` delegate to it. This allows
callers to more likely be able to make their widget tree const
constructible.
2019-04-07 21:29:32 -07:00
Todd Volkert
949023b276
Add Form.onSaved (#30643)
When submitting data to a server, callers need a callback that will
get invoked after all the individual form fields are saved. If they
have a button that submits the form, they could just do this logic
in the click handler for the button (save the form, then submit to
the server), but if they have more ways than one to submit the form
(i.e. hitting enter while in a text form field), then it becomes
more convoluted and calls for a unified callback that will get
notified when the form is submitted.
2019-04-07 21:02:09 -07:00
LongCatIsLooong
e153883d43
Provide a default IconTheme in CupertinoTheme (#30521)
-* Inserted an `IconTheme` widget under `CupertinoTheme` to provide a default icon color when using `CupertinoTheme`.
* Changed `CupertinoTheme` to a `StatelessWidget`, to match the implementation of `Theme`
* Changed the nesting order of `Theme`'s sub widgets, to let `Theme.iconTheme` take precedence, so that `Theme`'s behavior is kept as is.
2019-04-05 15:57:29 -07:00
chunhtai
2b7e98973a
Fix issue 21640: Assertion Error : '_listenerAttached': is not true (#30513) 2019-04-05 11:31:40 -07:00
Tong Mu
1ae32facfe
Correctly synthesise event buttons (#30535)
* Correctly synthesise buttons, and add tests
2019-04-05 09:53:40 -07:00
Justin McCandless
566ac3ce2f
Trackpad mode crash fix (#30475)
Fixes a crash that happened when attempting to select text in trackpad mode on iOS.
2019-04-05 09:35:26 -07:00
Hans Muller
73687a9771
Correct MaterialButton disabledColor (#30531) 2019-04-04 18:05:55 -07:00
Tong Mu
13101c1a86
Touching the screen adds 0x01 to buttons (#30457)
* Add constants `kPrimaryButton`, `kTouchContact` and `kStylusContact`
* PointerDownEvent and PointerMoveEvent will always set the 0x01 bit on buttons
2019-04-04 15:11:29 -07:00
Morgan
74ee010b7b Fix MaterialApp's _navigatorObserver when only builder used (#29413)
Fix MaterialApp's _navigatorObserver so it doesn't cause WidgetApp's assertion to fail when using custom navigator, fixes #18904
2019-04-04 15:02:11 -07:00
Tong Mu
423cf223d9
Fix edge cases of PointerEventConverter (#29998)
* Fix: ui.PointerChange.remove might contain position change, but we used to expand it into a Cancel and Remove, neither of which allows position change. A Hover event is added, and a test is updated accordingly.
* Fixed the issue where a PointerMoveEvent and a PointerCancelEvent do not receive the correct pressure.
* Refactor the calculation of delta into deltaTo.
2019-04-04 10:27:07 -07:00
Nikita
88d50f78f3 Implement compute for async function (#16265) (#30275) 2019-04-04 00:17:26 -07:00
Dan Field
069aabfe95
Draggable Scrollable sheet (#30058)
* Draggable Scrollable sheet
2019-04-02 18:07:30 -07:00
Amir Hardon
b6afc16a96
Make sure _handleAppFrame is only registered once per frame (#30346)
There were 2 possible scenarios in which _handleAppFrame is added more than once as a frame callback. When this happens it is possible that the second invocation will try to access _nextFrame.image when _nextFrame is null and crash. The 2 scenarios are:

Scenario 1

A GIF frame is decoded and a Flutter frame is executed before it's time to show the next GIF frame.
The timer that's waiting for enough time to elapse is invoked, and schedules a callback for the next Flutter frame(here).
Before the next Flutter frame is executed, MultiFrameImageStreamCompleter#removeListener is called followed by ``MultiFrameImageStreamCompleter#addListenerthat is invoking_decodeNextFrameAndSchedule` which is adding `_handleAppFrame` again as a next frame callback.
Scenario 2
removeListener and addListener are called multiple times in succession, every call to addListener can result in another registration of _handleAppFrame to the next Flutter frame callbacks list.

This patch fixes the issue by guarding against a second registration of _handleAppFrame.
2019-04-02 12:14:27 -07:00
Michael Goderbauer
7c76dee7a4
Make heroes fly on pushReplacement (#30228) 2019-04-01 18:14:20 -07:00
Hans Muller
14aa57b18d
Fix OutlineInputBorder crash (#30123) 2019-04-01 09:28:18 -07:00
xster
d166a8d81e
Make sure everything in the Cupertino page transition can be linear when back swiping (#28629) 2019-03-29 15:56:18 -07:00