6535 Commits

Author SHA1 Message Date
Hans Muller
cf87f68fd0
Correct InheritedTheme.captureAll() for multiple theme ancestors of the same type (#39089) 2019-08-23 09:41:03 -07:00
Greg Spencer
055c548902
Fix KeySet<T> (and LogicalKeySet, PhysicalKeySet) hashCode calculation (#38936)
This fixes the hashCode calculation for KeySet<T> so that it doesn't depend on the insertion order of the keys in the set.

The fix involves switching from Set<T> to HashSet<T> internally, so that the iteration order is stable around the hash values of the inserted keys, and not the insertion order. This matters when hashList is called in KeySet<T>.hashCode to build the hash value of the contents of the internal set.

Fixes #38919
2019-08-23 07:51:35 -07:00
Michael Goderbauer
97df403398
TweenAnimationBuilder for building custom animations without managing an AnimationController (#38317) 2019-08-22 20:48:53 -07:00
lisa-liao
ae847d9730 Allow independent theming of Persistent and Modal bottom sheets (#38650)
BottomSheetThemeData has an additional field modalElevation which makes it possible to set different elevations between persistent and modal bottom sheets.
2019-08-22 13:58:39 -04:00
Shi-Hao Hong
f0656ac37d
Explain const values in MediaQuery test file (#39059) 2019-08-22 13:43:17 -04:00
Shi-Hao Hong
3b7410476f
Add MediaQuery.systemGestureInsets to support Android Q (#37416)
* Wire Window.systemGestureInsets to MediaQuery.systemGestureInsets

* Add systemGestureInsets property to TestWindow
2019-08-22 00:34:11 -04:00
LongCatIsLooong
a671b28369
CupertinoDynamicColor and friends (#37719) 2019-08-21 20:07:42 -07:00
Chris Bracken
ffa3785411
Update package versions to latest (#39013)
This fixes a breakage in fuchsia where package_config version 1.1.0 is
required but flutter_tools is currently locked to 1.05.
2019-08-21 19:15:33 -07:00
adazh
93c32c4ff6
Moved the default BinaryMessenger instance to ServicesBinding (#38464)
* Moved the default BinaryMessenger instance to ServicesBinding

This reverts commit 821602aef36983d416836e5d6fcc78fe9d3facb1.

* Added assertion in defaultBinaryMessenger. Also fixed the devicelab tests.
2019-08-21 16:47:42 -07:00
LongCatIsLooong
9aea03f4af
Implement PageView using SliverLayoutBuilder, Deprecate RenderSliverFillViewport (#37024) 2019-08-21 15:02:24 -07:00
Nigel Gott
bf097eec87 Fix DragTarget not being rebuilt when a rejected Draggable enters #38786 (#38789) 2019-08-21 14:53:18 -07:00
Hans Muller
2e01eef5aa
Added InheritedTheme (#38583) 2019-08-21 14:02:19 -07:00
rami-a
6a5d32962c
[Material] Add clip property to bottom sheet and theme (#38831) 2019-08-21 16:14:52 -04:00
Greg Spencer
f515bf6abc
Revert "Automatic focus highlight mode for FocusManager (#37825)" (#38866)
This reverts commit a11d73148c90dd2980f0ab5a2d88159269937e3a because of a regression in
flutter_gallery_ios32__transition_perf's 90th_percentile_frame_build_time_millis.

Fixes #38860.
2019-08-20 18:50:09 -07:00
Michael Goderbauer
6d3c5381c7
Fix AnimationStatus for repeat(reverse: true) and animateWith (#37739) 2019-08-20 13:31:10 -07:00
Ian Hickson
bfd27f6bd7
Audit use of defaultTargetPlatform (#36871) 2019-08-20 13:27:13 -07:00
James D. Lin
b2f8d3a668
Instrument pending timers in tests (#37646)
Flutter widget tests assert if a test completes with timers still
pending.  However, it can be hard to diagnose where a pending timer
came from.  For example, a widget might consume a third-party library
that internally uses a timer.

I added a FakeAsync.pendingTimersDebugInfo getter to quiver
(https://github.com/google/quiver-dart/pull/500).  Make flutter_test
use it.

Additionally modify Flutter's debugPrintStack to take an optional
StackTrace argument instead of always printing StackTrace.current.

Fixes #4237.
2019-08-20 10:28:49 -07:00
Gary Qian
9da68fcdaf
Cache caret parameters (#38821) 2019-08-20 10:21:30 -07:00
Shi-Hao Hong
b7abf56a0b
Add ToggleButtons.textStyle property (#38813)
* Add ToggleButtons.textStyle property
2019-08-20 13:02:18 -04:00
chunhtai
878fe20a85
fix widgetspan does not work with ellipsis in text widget (#38699) 2019-08-20 09:41:21 -07:00
rami-a
109893c6cf
[Material] Add contentPadding property to SwitchListTile (#38709) 2019-08-20 09:55:29 -04:00
Darren Austin
9dce19e96f
Replace ButtonBar.bar method with ButtonBarTheme (#37544)
* Added new ButtonBarTheme to replace the deprecated ButtonTheme.bar method.

* Responding to PR feedback.

* [Material] Create material Banner component (#36880)

This PR creates a new material widget for the Banner component. This includes a theme as well. This widget can be dropped into any application, ideally at the top of a listview or scrollview.

(cherry picked from commit 35b6d668e197035ea2b57adb99041542982e8be0)

Removed the use of ButtonTheme.bar in the Banner implementation.

* Updated documentation from PR review comments.
2019-08-19 17:35:44 -07:00
Matt Carroll
324fe201b0
Add handling of 'TextInput.clearClient' message from platform to framework (#35054). (#35100) 2019-08-19 15:49:32 -07:00
Kaushik Iska
d2bc74aa6d
Fix analyzer issues for onReportTiming to frameTiming (#38840)
Filed: https://github.com/flutter/flutter/issues/38838
to track these usages.

This was introduced by: https://github.com/flutter/engine/pull/11041
2019-08-19 14:56:22 -07:00
Gary Qian
fb5b157098
Clamp scrollOffset to prevent textfield bouncing (#38573) 2019-08-19 12:45:52 -07:00
Kate Lovett
6ff212b328
Comparing pixels instead of bytes with GoldenFileComparator (#38473) 2019-08-19 09:06:22 -07:00
Greg Spencer
d6938c56d9
Adds canRequestFocus toggle to FocusNode (#38704)
* Add an 'unfocusable' focus node to allow developers to indicate when they don't want a Focus widget to be active

* more unfocusable changes. not working.

* Switch to focusable attribute

* Rename to canRequestFocus

* Turn off debug output

* Update docs

* Removed unused import
2019-08-16 15:27:49 -07:00
Yegor
34c692659e
Teach render objects to reuse engine layers (#36402)
Teach Layer and its implementations, RenderObject and its implementations, and PaintingContext to reuse engine layers. The idea is that a concrete RenderObject creates a Layer and holds on to it as long as it needs it (i.e. when it is composited, and the layer type does not change). In return, each Layer object holds on to an EngineLayer and reports it to the engine via addRetained and oldLayer. This allows the Web engine to reuse DOM elements across frames. Without it, each frame drops all previously rendered HTML and regenerates it from scratch.
2019-08-16 15:27:12 -07:00
Michel Feinstein
1a5e4a5d7f Adds the arrowColor option to UserAccountsDrawerHeader (#38608) (#38636)
Changes a hard-coded value to a controllable parameter.
2019-08-16 15:14:14 -07:00
Chris Yang
09f6515b73
PlatformViewLink: Rename CreatePlatformViewController to CreatePlatformViewCallback (#38710) 2019-08-16 14:24:01 -07:00
Kate Lovett
cac8fa5da0
Re-land 'Adding physicalDepth to MediaQueryData & TestWindow' (#38546) 2019-08-16 13:34:23 -07:00
Nurhan Turgut
c2e2f093ec
Navigator change backup (#38494)
* Broadcasting popRoute and pushRoute methods via SystemChannels.navigation. These messages will be used in flutter_web to detect the route

* Broadcasting popRoute and pushRoute methods via SystemChannels.navigation. These messages will be used in flutter_web to detect the route

* Reverting all unrelated formatting changes.

* Adding unit tests. Adding more comments.

* Changing string method names with constant strings.

* Fixing a constant strings.

* Fixing analyzer error.

* Fixing more white space.

* Changing the method names. Adding comments to the SystemChannels

* Comment and code name fixes

* replacing the comment with reviewer suggestion.

* addinf systemchannels.navigation mock to test bindings

* Adding a new class for sending route change notrifications. The nottifications are only sent on web. This should fix breaking android/ios

* using new class RouteNotificationMessages in navigator

* Fixing analyzer issues.

* fixing cycle dependency

* fixing github analyze error

* dartfmt two new classes. trying to fix anayze errors

* Update route_notification_messages.dart

* trying to fix white space errors
2019-08-16 13:17:45 -07:00
Chris Yang
0b087a898a
PlatformViewLink: update cached surface to be Widget type (#38639) 2019-08-16 11:23:21 -07:00
Shi-Hao Hong
ff0eca6463
Toggle buttons docs (#38635)
* Add toggle buttons assets

* Reorder video location, reduce height of videos

* Reduce height of toggle buttons assets
2019-08-16 14:19:54 -04:00
brandondiamond
c161ac898c Fix typos / errors in doc comments (#38558) 2019-08-16 11:18:39 -07:00
Greg Spencer
a11d73148c
Automatic focus highlight mode for FocusManager (#37825)
This adds a FocusHighlightMode to the FocusManager that switches based on the type of input that has recently been received. The initial value is based on the platform, but is updated as soon as user input is received. There is also a FocusHighlightStrategy enum so that the developer can change the strategy to a fixed value if needed.

The default is to automatically detect the mode based on the last type of user input. If they use a mouse or keyboard, it shows the focus highlights. If they use a touch interface, then the highlights disappear. This is consistent with the way that Android and Chrome work. The controls still receive focus, only the display of the highlight changes.

Text fields show the focus highlight regardless of the focus highlight mode.
2019-08-16 10:40:08 -07:00
Tom Robinson
1d03459fdb
Fix getOffsetToReveal for growthDirection reversed and AxisDirection down or right (#38441)
* Take growth direction into account when computing value for getOffsetForReveal in AxisDirection.right and .up conditions.

* Add alignment 1.0 test to left - reverse growth

* Add Reverse List showOnScreen test

* Formatting fix.
2019-08-16 13:38:23 -04:00
rami-a
13844aa62a
[Material] Create theme for Dividers to enable customization of thickness (#38621) 2019-08-16 13:09:36 -04:00
LongCatIsLooong
0ba8c2cdb1
Fix text scale factor for non-content components of Cupertino scaffolds (#38593) 2019-08-15 20:02:04 -07:00
Tom Robinson
0b3f2f61a2
Change RenderObject.getTransformTo to include ancestor. (#37652)
getTransformTo now includes ancestor in the transform it returns, except
for if ancestor is the root view, ensuring that the transform remains in
logical pixel space.
2019-08-15 20:52:15 -04:00
liyuqian
77aa495eff
Update shader warm-up for recent Skia changes (#37955)
The update is copied from an update we made to a Google-internal
client: cl/260202900

The update will save 1 shader compilation.

This should help solve our regression:
https://github.com/flutter/flutter/issues/31203

More regressions on iOS might be introduced later by
https://github.com/flutter/engine/pull/9813#issuecomment-520039890

Unfortunately, we didn't rebase our benchmarks so such regressions
were not detected.

Hence to fully solve https://github.com/flutter/flutter/issues/31203,
we might need to revert some change in
https://github.com/flutter/engine/pull/9813 to make iOS shader warm-up
happen on the GPU thread again.
2019-08-15 13:04:22 -07:00
Greg Spencer
a24bfed0e7
Add autofocus parameter to widgets which use Focus widget internally (#37809)
Add an autofocus parameter to widgets which use Focus widget internally, and update related docs.

This will allow developers to request that a particular widget be automatically focused when shown.
2019-08-15 12:30:19 -07:00
Chris Yang
5acf63d35a
PlatformViewLink, handling creation of the PlatformViewSurface and dispose PlatformViewController (#37703)
* link

* review fixes

* review fixes

* remove extra line
2019-08-15 12:16:38 -07:00
MH Johnson
1033155fb9
[Material] Add splashColor to FAB and FAB ThemeData (#38467)
* [Material] Add splashColor param to FAB and FAB ThemeData
2019-08-15 13:12:21 -04:00
Jason Simmons
fe5651b846
Do not construct arguments to _focusDebug when running in non-debug modes (#38463)
The time required to call FocusNode.toString and build _focusDebug messages
was showing up in some performance benchmarks.
2019-08-14 09:46:20 -07:00
Francisco Magdaleno
760635e6db
[linux] Receives the unmodified characters obtained from GLFW (#34752) 2019-08-13 18:14:36 -07:00
MH Johnson
17ddfb1b42
make RawChip.selected non-nullable (#37556) 2019-08-13 17:36:44 -04:00
Shi-Hao Hong
2003432cd8
Drawer edge drag width improvements (#37492)
* Added customizable drawer edge drag width parameter to Drawer and Scaffold

* Fix Drawer drag area width for notched devices

* Update Drawer tests to reflect necessary LTR and RTL Drawer edge widths
2019-08-12 18:20:35 -04:00
Shi-Hao Hong
0f3919e539
Adds DefaultTextStyle ancestor to Tooltip Overlay (#37877)
* Add DefaultTextStyle parent widget to Tooltip Overlay

* Add test against fallback DefaultTextStyle
2019-08-12 17:24:51 -04:00
Greg Spencer
aa5cc40368
Focus Manager debug output improvements. (#37891)
This improves the ability to debug focus manager issues. It's not meant to be used by developers unless they're debugging problems with the focus manager itself.
2019-08-12 13:02:49 -07:00