6112 Commits

Author SHA1 Message Date
Darren Austin
3d93f24c05
Tapping a modal bottom sheet should not dismiss it by default (#32528)
Removed the GestureDetector from the modal bottom sheet that dismissed it on tap and updated several tests to accommodate this change.
2019-05-15 15:50:39 -07:00
Amir Hardon
f545f47d8f
Add a FocusNode for AndroidView widgets. (#32773)
The PlatformViewsService listens for `viewFocused` calls on the
platform_views system channel and fires a callback that focuses the
focus node for the relevant AndroidView widget.
2019-05-15 15:25:50 -07:00
MH Johnson
da0a3a275a
[Material] Remove inherit: false on default TextStyle in bottom navigation bar (#32727) 2019-05-15 10:30:41 -04:00
Hans Muller
30fed3a05d
Material should not prevent ScrollNotifications from bubbling upwards (#32726) 2019-05-15 07:15:34 -07:00
Chris Bracken
0d8959448c
Correct platform reference in UiKitViewController (#32724)
Correct docs and error message for UiKitViewController to refer to iOS
view rather than Android views. Minor cleanup to the docs for
PlatformViewsService, which previously mentioned Android only.
2019-05-14 21:27:34 -07:00
Greg Spencer
bb3c660522
Implements focus handling and hover for Material buttons. (#31438)
This implements focus and hover handling for Material buttons. It inserts Focus widgets into the tree in order to allow buttons to be focusable via keyboard traversal (a.k.a. TAB traversal), and Listener widgets into the InkWell to allow the detection of hover states for widgets.

Addresses #11344, #1608, and #13264.
2019-05-14 20:48:29 -07:00
Greg Spencer
ed90d05596
Fix needsCompositing propagation from child widgets. (#32717)
This fixes propagation of needsCompositing from child widgets.

When needsCompositing is turned on by a child widget, it necessarily sets the needsCompositing bit of its parent widget, but RenderPointerListener was ignoring that piece of information and only turning on compositing if it thought it needed it for itself.

This corrects that, and adds a test for the condition, and updates a test that was affected by the change.

Fixes #32525 (again)
2019-05-14 17:09:29 -07:00
Darren Austin
752147e2b1
Added 'enabled' property to the PopupMenuButton (#32527)
Added 'enabled' property to the PopupMenuButton to allow the button to be disabled in the case where the menu would be empty.
2019-05-14 15:48:13 -07:00
Efthymis Sarmpanis
7498ad00b5 Add a more meaningful message to the assertion on children property of MultiChildRenderObjectWidget and SliverChildListDelegate. (#32487) 2019-05-14 12:41:07 -07:00
Hans Muller
d9f6cada1c
Tabs code/doc cleanup (#32654) 2019-05-14 12:00:03 -07:00
Mouad Debbar
bcae3563d4
Redo: Show/hide toolbar and handles based on device kind (#32704) 2019-05-14 11:04:16 -07:00
Mouad Debbar
ef5abcc6bf
Revert "Show/hide toolbar and handles based on device kind (#29683)" (#32702)
This reverts commit 18ca37542d8e946724f1ccc41b6d7c98c28d7164.
2019-05-14 09:33:04 -07:00
Mouad Debbar
18ca37542d
Show/hide toolbar and handles based on device kind (#29683) 2019-05-14 08:50:23 -07:00
Greg Spencer
96ebfec1a3
Add diagnostics around needsCompositing (#32656)
Added diagnostic output for needsCompositing to RenderObject diagnostics output.
2019-05-14 08:02:25 -07:00
Greg Spencer
a5053bfb29
Fix transforms for things with RenderPointerListeners (#32535)
This fixes #32525, because it now marks the compositing bits as needing to be recalculated if the mouse tracker changes its idea of whether or not a mouse is attached.

This bug occurred because the test framework was leaking state from one test to the next (the state about whether a mouse pointer was active), and so even though there was a "passing" test when run in order with the other tests in the file, when the test was run individually (or first), it would have failed and caught the bug.

This adds an assert to make sure that after each test there are no simulated mouse pointers connected, and now calls removePointer in all of the tests where this was a problem.
2019-05-13 15:48:12 -07:00
Shi-Hao Hong
41ff8408ca
Add Actions to AppBar Sample Doc (#32530)
* Add actions to AppBar sample doc
2019-05-13 15:19:14 -07:00
liyuqian
06f86c8b2f
Reland matrix check (#32521)
This relands flutter/flutter#31701 with missing const added

This reverts commit 549b412656bb4db80920de56a09912e079fdd2a2.
2019-05-13 14:36:09 -07:00
xster
1cd88c3501
Let CupertinoNavigationBarBackButton take a custom onPressed (#32469) 2019-05-13 12:41:24 -07:00
Shi-Hao Hong
9545c5d166
Tab Animation Sample Video (#32177)
* Improve tabs documentation regarding matching lengths

* Add Tabs animation to docs
2019-05-13 09:06:43 -07:00
Kate Lovett
829bdeb426
Fixing accidental merge from WIP branch. (#32520)
Revert "Merge branch 'master' into master"

This reverts commit e3a03c04c4530b06e77383fd73d2c43644dc832a, reversing
changes made to 64749826498123e795c77f9bec8cea804a40a051.
2019-05-10 15:53:41 -07:00
Kate Lovett
e3a03c04c4
Merge branch 'master' into master 2019-05-10 15:16:40 -07:00
Dan Field
382704ca95
Use precisionErrorTolerance (#32499) 2019-05-10 13:28:19 -07:00
Jonah Williams
549b412656
Revert "Add more asserts to check matrix validity (#31701)" (#32496) 2019-05-10 10:05:15 -07:00
liyuqian
0dc290c023
Add more asserts to check matrix validity (#31701)
## Description

These will help identify where the matrix starts to get wrong. 

Also fixed `RenderFittexBox` to no longer paint with empty child which previously triggered invalid matrix computations (NaN with dividing by 0). See also https://github.com/flutter/flutter/pull/7489

## Related Issues

https://github.com/flutter/flutter/issues/31650
https://github.com/flutter/flutter/issues/31700
https://github.com/flutter/flutter/issues/7431

## Tests

* RenderFittedBox does not paint with empty sizes
2019-05-10 09:33:09 -07:00
Riccardo Ratta
705143855f Make font semibold when isDefaultAction is true in CupertinoDialogAction (#31308)
Make font semibold when isDefaultAction is true in CupertinoDialogAction
2019-05-10 08:22:56 -07:00
Efthymis Sarmpanis
b24f1f78a7 Add breadcrumbs to TextOverflow (#32328) 2019-05-10 13:29:31 +02:00
Hans Muller
6d0e235cf8
Support for replacing the TabController, after disposing the old one (#32434) 2019-05-09 22:02:46 -07:00
Greg Spencer
d2fe08628d
Implements FocusTraversalPolicy and DefaultFocusTraversal features. (#30076)
This implements a DefaultFocusTraversal widget to describe the focus traversal policy for its children, defined by a FocusTraversalPolicy object from which custom policies may be created. Pre-defined policies include widget-order traversal, "reading order" traversal and directional traversal.
2019-05-09 20:24:23 -07:00
Greg Spencer
66a6726306
Fix benchmark regression in layer.find<S>(Offset) (#32425)
This fixes a benchmark regression introduced in #32350. The performance is improved by just reverting the Layer.find<S> routines to use their old definitions, instead of defining them in terms of the findAll<S> lazy iterators.

Fixes #32387
2019-05-09 12:25:52 -07:00
Phil Quitslund
3a6acb8c25
More const conversions (#32408)
* update immutable to const

* => const lists

* revert making list const

* make Centers const
2019-05-09 09:23:30 -07:00
Jonah Williams
4d3b51e284
Allow flutter web to be compiled with flutter (#32360) 2019-05-09 08:57:26 -07:00
Phil Quitslund
d96c1c88b7
make immutables const (#32340)
* make immutables const
2019-05-09 05:47:01 -07:00
Michael Goderbauer
1621baafc7
Introduce separate HitTestResults for Box and Sliver (#31894) 2019-05-09 10:00:01 +02:00
Greg Spencer
aeccd6a8bc
Fix nested listeners so that ancestor listeners can also receive enter/exit/move events. (#32350)
This changes Listener to trigger enter/move/exit in all Listeners below the pointer, not just the leaf region (the first region hit). This is because we need to allow listeners to be nested so that, say, a widget that handles changing color on hover, but also is wrapped in a Tooltip (that handles hover) can trigger both actions, not just one.

To that end, I added a findAll to Layer, similar to the existing find method that was previously used. It returns an iterator over annotated layers which match the given data type.

Since the findAll is implemented as returning an Iterable (and is sync*), I re-implemented the find routines as just returning the first result from findAll, since that should be just as efficient, and would then prevent duplication in the implementation.
2019-05-08 17:57:42 -07:00
Greg Spencer
23baae0e45
Fix RenderPointerListener so that callbacks aren't called at the wrong time. (#32142)
I recently added some code to keep hover events from being propagated when a mouse wasn't attached. While that works, there are times when it can fire callbacks during the building of other components, since they can now be called from detach/attach. This is not ideal, since it will assert then. This changes the code so that it won't update the annotations during attach/detach, but also won't push the annotation layer unless a mouse is connected, achieving the same result as before, but with better semantics.

The basic problem is that in the detach for RenderPointerListener, it would detach the annotation, which could cause onExit to be called on the annotation, since the widget was disappearing under the mouse, and thus needs to receive an onExit, but that onExit might be (and probably will be) calling setState, which marks the owning widget as needing to be built, sometimes when it already has been.

The fix creates a new _ListenerElement that overrides activate and deactivate in order to tell the render object ahead of the detach that it might be detached, and so the onExit gets called before the detach instead of during it.

In addition, I now avoid scheduling more than one check for mouse positions per frame.
2019-05-08 12:20:31 -07:00
chunhtai
21efdff8a5
fix issue 32212 Text field keyboard selection crashes (#32256) 2019-05-07 15:07:11 -07:00
Shi-Hao Hong
2f1e7cf662
Added state management docs/sample to SwitchListTile (#32147)
* Added documentation to SwitchListTile
2019-05-07 08:33:22 -07:00
Ian Hickson
b770cdf267
Revert "Add shape property to SliverAppBar (#31662)" (#32155)
This reverts commit 28b58db1f21af7ef7a913aea7971a0513d87f11b.
2019-05-06 12:02:02 -07:00
Michael Klimushyn
fecba55888
Remove deprecated decodedCacheRatioCap (#32041) 2019-05-06 11:19:35 -07:00
yaheng
57d6666462 Fix text selection toolbar appearing under obstructions (#29809) 2019-05-06 11:18:09 -07:00
Tiziano Munegato
28b58db1f2 Add shape property to SliverAppBar (#31662) 2019-05-06 10:34:37 -07:00
Darren Austin
017997b9c1
Increase size of touch regions in the Time Picker header (#32053)
- Increased the AM/PM, minute and hour buttons to at least 48x48
- Added InkWells to all of them
- Adjusted the landscape layout for the AM/PM buttons to be horizontal
- Added a test to ensure the regions are at least 48x48
2019-05-06 10:27:16 -07:00
Darren Austin
2d2edbf70b
Date picker layout exceptions (#31514)
Fixed several layout issues with the material date picker. Mostly just removed hard coded sizes to allow the grid view to scroll instead of overflowing.
2019-05-06 10:26:26 -07:00
Antti Ahti
526113db32 Fix tab indentation (#31798)
Code indentation was done with tabs in some places. Replaced with spaces.
2019-05-06 14:09:54 +02:00
Michael Goderbauer
cc239580d3
Make Hover Listener respect transforms (#32025) 2019-05-06 13:36:13 +02:00
Michael Goderbauer
ea03ac2b84
Revert "Sliver animated list (#28834)" (#32135)
This reverts commit d2de911d50ea792d6743b2cdc74e8daf26112b91.
2019-05-06 11:53:32 +02:00
Simon Binder
d2de911d50 Sliver animated list (#28834) 2019-05-06 11:26:38 +02:00
LongCatIsLooong
8800153468
Fix CupertinoSliverRefreshControl onRefresh callback (#32086)
Replace CupertinoSliverRefreshControl.onRefresh's then callback with whenCompleted callback, so when onRefresh completes with error the sliver refresh control retracts like when it completes with value.
2019-05-04 15:54:44 -07:00
Shi-Hao Hong
2f75005a16
Fix Exception on Nested TabBarView disposal (#31581)
* Add Flag to determine if pixels is set by viewport during disposal

* Add TODO to remove nested TabBarView workaround once unnecessary build/dispose issues are resolved
2019-05-04 09:14:49 -07:00
Hans Muller
73957b94e7
Test Material buttons against a11y contrast guidelines (#32050) 2019-05-03 16:13:42 -07:00