5310 Commits

Author SHA1 Message Date
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
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
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
Greg Spencer
11e0a725d4
Re-land: Add support for Tooltip hover (#31699)
This is a re-land of #31561, after fixing performance regressions.

Added change listening to the MouseTracker so that the Listener and tooltip can react to whether or not a mouse is connected at all. Added a change check to make sure Listener only repaints when something changed.

Fixes #22817
2019-05-03 13:00:36 -07:00
Gary Qian
3bd1737c0e
Partially Rollback caret change for Android (#32043) 2019-05-03 12:32:04 -07:00
Justin McCandless
0a3df1b576
Text wrap width (#31987)
Add `textWidthBasis` param to Text to allow calculating width according to longest line.
2019-05-03 11:41:07 -07:00
chunhtai
38808d9fe4
Reland fix 25807 implement move for sliver multibox widget (#31978) 2019-05-03 09:48:20 -07:00
Efthymis Sarmpanis
39d660be78 Extract TODO comment from Image.asset dardoc (#31903) 2019-05-03 08:29:02 -07:00
Efthymis Sarmpanis
d095b05522 Updated primaryColor docs to refer to colorScheme properties (#31902) 2019-05-03 08:28:16 -07:00
Tong Mu
7beb09e76a
Redo "Remove pressure customization from some pointer events" (#30874)
* Revert "Revert "Remove pressure customization from some pointer events (#30414)" (#30873)"

This reverts commit f34c2ef0a31b7d955035576eeedb0cee7508b2a8.

* Revert pressure removal of PointerUpEvent

* Replace PR with an issue

* Add tests for fromMouseEvent
2019-05-02 23:05:01 -07:00
MH Johnson
a40e5c90f0
[Material] selected/unselected label styles + icon themes on BottomNavigationBar (#31018)
* add text style params

* add icon theme params

* Added tests
2019-05-02 18:20:16 -04:00
chunhtai
caebdaf1e8
fix issue 30526: rounding error (#30979) 2019-05-02 12:42:25 -07:00
Hans Muller
4230e9674c
Simplify drawer scrimColor defaults, update tests (#31947) 2019-05-02 11:57:01 -07:00
Justin McCandless
34325ba33a
Revert "Tight Paragraph Width (#30988)" (#31979)
This reverts commit 323108ff47fd6caaeb8eaf30716e70d860673a1e due to weird engine dependency bug
2019-05-02 10:36:51 -07:00
Justin McCandless
323108ff47
Tight Paragraph Width (#30988)
Add `textWidthBasis` param to Text to allow calculating width according to longest line.
2019-05-02 09:21:45 -07:00
James Lin
0c20a2ed01 Fix MediaQueryData.toString() to generate readable output
MediaQueryData.toString() omitted commas and spaces around some
properties, making the output difficult to read.
2019-05-02 08:44:51 -07:00
Todd Volkert
f48cc4611a
Add documentation to Navigator (#31851) 2019-05-02 08:02:11 -07:00
Jacob Richman
e17f9e8ff8
Fix bug handling cyclic diagnostics. (#31960) 2019-05-01 22:09:53 -07:00
LongCatIsLooong
15f187fce0
Add docs to AppBar (#31317)
- Added docs to AppBar to cover AppBar's inherited MediaQuery when not used in a Scaffold in general
- s/Hero]s/Hero]es/
2019-05-01 20:39:37 -07:00
Dan Field
5b2281e747
Make Flex only overflow on epsilon (#31890) 2019-05-01 17:28:33 -07:00
Diego Velásquez López
d8bb880d08 added scrimColor property in Scaffold widget (#31025) 2019-05-01 14:50:52 -07:00
Shi-Hao Hong
7690bb47dc
Add Horizontal Padding to Constrained Chip Label Calculations (#31861)
* Add horizontal padding and properly constrain chip label calculations

* Added regression test for avatar, label and delete icon constraint
2019-05-01 13:46:36 -07:00
Jonah Williams
06973f58a7
Revert "Revert "fix edge swiping and dropping back at starting point (#31623)" (#31876)" (#31923) 2019-05-01 12:53:04 -07:00
Shi-Hao Hong
0c871b8528
Improve RadioListTile Callback Behavior Consistency (#31574) 2019-05-01 12:52:52 -07:00
Greg Spencer
be75fb36c5
Change unfocus to unfocus the entire chain, Fix setFirstFocus (#31909)
In #31614, I added an unfocus() to FocusNodes to allow giving up of focus, but it only worked on the primary focus. This changes that so that it will unfocus the entire chain, not just the primary focus. Now, if you call unfocus() on a FocusNode or FocusScopeNode, and their hasFocus returns true, then after calling unfocus(), it will return false. Before this change, it would only do that if hasPrimaryFocus was also true.

This also fixes a bug in the way setFirstFocus was implemented, making it conform more to the behavior of the previous implementation. It has simplified logic in reparent, and in when it requests focus for scope nodes that have had setFirstFocus called on them.
2019-05-01 12:20:41 -07:00
Jacob Richman
63aa5b3647
Refactor core uses of FlutterError. (#30983)
Make FlutterError objects more structured so they can be displayed better in debugging tools such as Dart DevTools.
2019-05-01 11:20:12 -07:00
rami-a
6a1468db16
Add BottomSheetTheme to enable theming color, elevation, shape of BottomSheet (#31318)
* Introduce BottomSheetTheme and shape support for bottom sheet

* Add bottom sheet theme to ThemeData. Use theme in bottom sheet build

* Expose color, elevation, shape to showModalBottomSheet helper

* Expose color, elevation, shape to showBottomSheet helper

* Address PR feedback

* Address PR feedback

* Address additional PR feedback
2019-05-01 13:10:50 -04:00
Jonah Williams
60a1b2b9ea
Revert "Redo: Add buttons to gestures (#31819)" (#31912)
This reverts commit fea2c7d671633fea21bfc93ccddbb57c4510752f.
2019-05-01 10:06:45 -07:00