Commit Graph

6520 Commits

Author SHA1 Message Date
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 35b6d668e1)

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
Justin McCandless
19d113b0e7
resizeToAvoidBottomInset Cupertino without NavBar (#37319)
Fix a bug in CupertinoTextField where resizeToAvoidBottomInset didn't work.
2019-08-12 12:56:19 -07:00
rami-a
b8484e348e
Update documentation for bottom sheets to accurately reflect usage (#37964) 2019-08-12 12:26:54 -04:00
Emmanuel Garcia
83a8a575ee
Update dependencies (#37971) 2019-08-10 12:38:20 -07:00
Shi-Hao Hong
c7814d698d
Add dense property to AboutListTile (#37882) 2019-08-09 20:03:09 -04:00
Michael Klimushyn
821602aef3
Revert "Moved the default BinaryMessenger instance to ServicesBinding (#37489)" (#37983)
This reverts commit 92ef2b9ce1.

This requires either runApp() or
WidgetsFlutterBinding.ensureInitialized() to have been called before
using any MethodChannels. Plugins broadly rely on MethodChannels and
right now there's no general requirements that they be constructed
within the runApp call, so the ecosystem breakages from this are broader
than originally thought. Reverting for now.
2019-08-09 16:30:30 -07:00
Justin McCandless
361730ed72
iOS 13 scrollbar vibration (#37724)
Vibrate when starting scrollbar dragging.
2019-08-09 15:45:15 -07:00
Christian Mürtz
f0354b82e6 Add CheckboxListTile checkColor (#37636)
* Add checkColor to CheckboxListTile

* Create second paint for drawing check and dash

* Add activeColor test for Checkbox

Co-Authored-By: Shi-Hao Hong <shihaohong@google.com>
2019-08-09 17:28:02 -04:00
Brian Egan
5019321243 Diagrams for API docs rank 10-20 in most views (#37624) 2019-08-09 14:22:28 -07:00
Christian Mürtz
f167067d94 Fix TextField cursor color documentation (#37801) 2019-08-09 14:18:57 -07:00
Kate Lovett
f3dbefd3ce
Revert "Adding physicalDepth to MediaQueryData & TestWindow (#37718)" (#37938)
This reverts commit 3a2d30813a.
2019-08-09 12:58:59 -07:00
adazh
92ef2b9ce1
Moved the default BinaryMessenger instance to ServicesBinding (#37489) 2019-08-09 10:13:40 -07:00
Brett Morgan
20ecae0e92 Fix markdown link format (#37715) 2019-08-09 09:59:24 -07:00
chunhtai
35532e09f0
hiding original hero after hero transition (#37341) 2019-08-09 09:51:22 -07:00
Michael Goderbauer
a6d68ee6dd
remove Header flag from BottomNavigationBar items (#37870) 2019-08-08 19:31:28 -07:00
liyuqian
218b113343
Listen to ExtensionEvent instead of TimelineEvent (#37900)
TimelineEvents may not be sent if there aren't enough to form a group.
Hence we should always use ExtensionEvent as the trigger.

See also https://github.com/flutter/flutter/pull/37503
2019-08-08 18:43:33 -07:00