340 Commits

Author SHA1 Message Date
Dragoș Tiselice
e1ebc41a14 Material fixes (#5293)
* Added return value to a onNotification callback.

The LayoutChangedNotification callback was missing a return value.
This commit changes it to return true and stop notification from
bubbling up the tree.

* Changed _RenderInkFeatures to use fresh clip box.

Since it wasn't using the most current value of the RenderBox's
size, _RenderInkFeatures was rendering splashes incorrectly when
the underlying Material size was animating. This commit changes
the clip reference to use the size of the Renderbox instead of
the size method in order to get the newest value.
2016-08-08 16:56:09 -07:00
Ian Hickson
84cbefe2d4 Revert "When a list is scrolling, children can't be tapped" (#5264) 2016-08-05 13:42:55 -07:00
Ian Hickson
ea7d5bf291 When a list is scrolling, children can't be tapped (#5222) 2016-08-05 10:40:24 -07:00
Adam Barth
7fd3691076 Heroes in flight shouldn't be interactive (#5246)
After this patch, they ignore pointers.
2016-08-05 08:43:16 -07:00
Matt Perry
92d0445a8f Add a fade-in animation for the text selection controls. (#5190)
BUG=https://github.com/flutter/flutter/issues/3938
2016-08-04 16:51:09 -04:00
Matt Perry
8f3c498f2d Initialize ScrollBehavior's content size to infinite rather than 0. (#5199)
Why this matters: If you navigate back to a page with a Scrollable that
has a nonzero scrollOffset, we will restore that scrollOffset. We clamp
the scrollOffset to the contentExtent before the first layout, before
contentExtent is updated to its proper value. Initializing contentExtent
to INFINITY effectively disables the first clamp, until we can get a
valid value from layout. Since the previous scrollOffset was valid, it
seems safe to assume it's still valid.

BUG=https://github.com/flutter/flutter/issues/4883
BUG=https://github.com/flutter/flutter/issues/4797
2016-08-04 15:46:24 -04:00
Jason Simmons
f8a80b1da6 Notify a Scrollable that the associated animation has stopped (#5209)
This also required changing the AnimationController state transition
logic to signal completion of the animation during the tick that
finishes the simulation.

Fixes https://github.com/flutter/flutter/issues/3675
2016-08-04 10:26:35 -07:00
Jason Simmons
b87cc8b14c Handle disposal of a HeroState while a hero is animating (#5189)
Fixes https://github.com/flutter/flutter/issues/5178
2016-08-04 10:26:26 -07:00
Jason Simmons
39be1c3747 Tell image listeners if they are being called synchronously by the ImageStream (#5161)
Image listeners installed in paint handlers need to know whether the listener
is being called during the paint.

Fixes https://github.com/flutter/flutter/issues/4937
2016-08-02 16:07:21 -07:00
Hans Muller
2656006c41 OverscrollIndicator tracks horizontal drag input, etc (#5183) 2016-08-02 15:58:02 -07:00
Hans Muller
56a2d2262c Pesto home stack (#5168) 2016-08-01 15:09:50 -07:00
Ian Hickson
735120f113 Extract applyImageFit logic. (#5158)
Also, add FractionalOffset.inscribe.
2016-07-29 16:52:42 -07:00
Dragoș Tiselice
f3444fcf28 Added BorderRadius. (#5072)
* Added custom radii to RRect.

This is the first commit towads an implementation of
MergeableMaterial. It adds custom radii to RRect.

* Renamed RRect constructors and added BorderRadius.

BorderRadius is a class similar to EdgeInsets that lets you define
all rounded corners of a rounded rectangle easily.
2016-07-29 16:17:57 -07:00
Ian Hickson
51f8fb9979 Add a scrollbar to the license screen. (#5114)
And make Scrollbar work with LazyBlock.

And an about box to the Stocks sample app.
2016-07-29 15:44:12 -07:00
Hans Muller
566cacbd83 Don't leave tabs hanging in the middle (#5153) 2016-07-29 14:15:59 -07:00
Adam Barth
8219ab61ab Don't rebuild routes on the second animation frame (#5097)
Previously we would rebuild every route on the second animation frame to
rejigger the offstage bit and the animations. Now we build the page once and
update the offstage bit in place and update the animations using
ProxyAnimations.
2016-07-27 13:49:30 -07:00
Ian Hickson
1097d92a8b Fix DatePicker (#5061)
Fundamentally the core problem was that we were not saying how wide a
date picker should be. It should be 330 pixels, if I'm measuring the
spec's mocks correctly.
2016-07-27 08:57:56 -07:00
Ian Hickson
edc548adf8 Update the license mechanism to show package names (#5051) 2016-07-26 13:09:47 -07:00
Jason Simmons
3b577c537c Clear the pointer absorbing flag after temporarily setting it while popping a route (#5036)
Fixes https://github.com/flutter/flutter/issues/4910
2016-07-26 11:13:34 -07:00
Hans Muller
4c3018f725 A tap is not a scroll (#5038) 2016-07-26 09:55:43 -07:00
Adam Barth
b30959d748 Center AppBar title on iOS (#5039)
This patch adapts the AppBar to feel more like iOS by centering the title.

Fixes #4962
2016-07-25 18:40:59 -07:00
Adam Barth
e4e6b01afa Adapt FlexibleSpaceBar to iOS (#5037)
We should center the title of flexible space bars on iOS.

Related to #4962
2016-07-25 17:05:29 -07:00
Adam Barth
ae80d43364 Don't animate fab in a new scaffold (#5015)
If the scaffold is new and has a floating action button, we skip the entrance
animation for the fab.

Fixes #4445
2016-07-22 15:53:08 -07:00
Hans Muller
7beedd7a95 Report ScrollNotification depth (#4992) 2016-07-22 09:20:46 -07:00
Dragoș Tiselice
6f0635d6e8 Merge pull request #4953 from flutter/drawer-header-update
Updated DrawerHeader to new spec.
2016-07-21 11:17:18 -07:00
Dragoș Tiselice
3aa26cb1cc Merge pull request #4971 from flutter/circle-avatar-background-image
Added backgroundImage to CircleAvatar.
2016-07-21 11:16:36 -07:00
Hans Muller
36eb4a066f Support for Material arc point and rect transitions (#4938) 2016-07-21 10:48:41 -07:00
Ian Hickson
69d78325ec Licenses (#4984)
This makes the about page show the licenses of all the Dart packages that a Flutter app uses.

Issues that this does not yet resolve:
- I'm still working on getting the full list of licenses for the sky_engine package.
- Some of the licenses don't print very readably.
- There's no scrollbar on the license page.

I'll provide fixes for the first two in the coming days, but this should unblock anyone who is wanting to see something here, even if it's not quite complete. :-)

----

The patch makes the following changes: 

- The license registry is now asynchronous, since the data comes from disk.
- I moved the default license collector from the foundation package to the services package since it uses the default asset bundle now.
- The FLX builder now includes the LICENSE files of each Dart package mentioned in the `.packages` file.
2016-07-21 09:09:48 -07:00
Dragos Tiselice
65e77142e9 Updated DrawerHeader and added UserAccountDrawer.
Removed old Stack layout and added a simple-to-extend interface for the
new drawer header. Also added a specialized UserAccountsDrawerHeader
consistent with Material Design guidelines.
2016-07-20 16:16:08 -07:00
Dragos Tiselice
83f37246d5 Added backgroundImage to CircleAvatar.
In order to have an efficient way to display clipped avatars,
backgroundImage was added inside of the container's BoxDecoration.
Fixes #4964. This commit also fixes #4567 where the radius property
actually sets the diamater.
2016-07-20 09:52:21 -07:00
Adam Barth
63b034e6b8 Showing the material grid shouldn't lose app state (#4857)
Previously adding the GridPaper caused us to lose all the state in our app. Now
we use a global key to keep our state.

Fixes #4648
2016-07-08 14:44:56 -07:00
Adam Barth
dda744eccc Fix attaching a dirty, detached SemanticsNode (#4855)
Previously we triggered an assert.

Fixes #4850
2016-07-08 13:28:42 -07:00
Adam Barth
c9248cd4a6 Tooltip can disappear too quickly (#4851)
We were stacking up two dismiss timers. Now we don't start a new timer
if we've already got one. Also, fix an animation leak caught by the
test.

Fixes #4640
2016-07-08 09:52:09 -07:00
Adam Barth
fc711a10cd Custom switch images are nutty (#4852)
Rather than requiring the developer to specify a full Decoration, we now
just take an ImageProvider for the thumb image. Also, fix
ImageFit.scaleDown to actually work.

Fixes #4571
Fixes #4673
2016-07-08 09:51:51 -07:00
Adam Barth
d7a4a54b36 TwoLevelSublist should have an onOpenChanged callback (#4848)
Also, fix an animation leak found by the test.

Fixes #4619
2016-07-08 08:07:05 -07:00
Adam Barth
839def55ba Teach the system to shutdown semantics (#4811)
We now stop updating semantics when there are no remaining clients.
2016-07-01 17:57:10 -07:00
Adam Barth
5ed8f1a1fd Add semantics for Sliders (#4808)
Also, make SemanticsOwner into a real class and use it instead of a static in
several places.
2016-07-01 13:38:24 -07:00
Adam Barth
e0f37027ab Add some tests for these tweens (#4804) 2016-07-01 09:46:37 -07:00
Adam Barth
95a26ab0e8 Switch to SemanticAction (#4791)
This patch updates the framework to use the new SemanticAction in
semantics.mojom.
2016-06-30 17:38:05 -07:00
Hans Muller
d9b9983e1a Refresh indicator (#4788) 2016-06-30 10:07:28 -07:00
Adam Barth
63eedb7677 Semantics debugger shouldn't crash when reparenting nodes (#4782)
Our previous approach to detecting when we needed to remove semantics nodes
didn't account for reparenting.
2016-06-28 14:44:02 -07:00
pq
543f705adb Cleanup empty statements.
The new `empty_statements` lint (in the next DEV roll), flags these empty statements.  Harmless, except the one in `basic.dart` that fixes a real-life bug. :)
2016-06-28 13:42:22 -07:00
Chinmay Garde
1a5ca2f675 Fix failing tooltip_test.dart by avoiding floating point comparisons. (#4781) 2016-06-28 12:49:11 -07:00
Adam Barth
41d6303570 Improve test coverage for material.dart (#4776)
Previously these widget had zero test coverage. Also, improve the
coverage tooling Mac.
2016-06-28 08:48:48 -07:00
Adam Barth
14f42a6a48 Improve test coverage in rendering.dart (#4775) 2016-06-27 17:38:53 -07:00
Adam Barth
bb0c41f2a6 Improve test coverage for gestures.dart (#4773)
This patch adds tests for some code paths we weren't hitting before and removes
some dead code that couldn't be tested because it was unreachable.
2016-06-27 14:42:41 -07:00
Adam Barth
2af668f832 Change how navigator prevents redundant operations (#4769)
* Change how navigator prevents redundant operations

Instead of requiring transactions, we now cancel all active pointers that are
interacting with the navigator and absorb future pointers until we get a chance
to build. This approach isn't perfect (e.g., events that trigger off the
cancelled pointers could still interact with the navigator), but it should be
better than the current transaction-based approach.

Fixes #4716

* Remove openTransaction

* test

* fixup
2016-06-27 13:07:47 -07:00
Hans Muller
08bf1b6bce Scrollable dropdown, dropdown underline cosmetics (#4766) 2016-06-27 10:28:20 -07:00
Adam Barth
9c0c0225a6 Add a test for GridPaper (#4754)
Previously this widget was completely untested.
2016-06-24 20:46:17 -07:00
Adam Barth
9850fe1861 Test all but one line in animation.dart (#4751)
The one line we don't test is the private constructor for the Curves class,
which exists to ensure that no one constructs the Curves class.
2016-06-24 16:33:04 -07:00