358 Commits

Author SHA1 Message Date
Dragoș Tiselice
e382701a9f Changed ExpandIcon to accept default state. (#5521)
Changed the ExpandIcon constructor to take a default expansion state.
If the widget gets rebuilt with a different expansion value, the
animation will trigger but the callback will not.
2016-08-22 12:54:16 -07:00
Hans Muller
da34ae654f Ease Material route animations redux (#5509) 2016-08-19 17:18:42 -07:00
Bob Nystrom
9efb168521 Fix an incorrect covariant function type. (#5492)
The type of rejects should be List<dynamic> to match the type that
DragTarget expects. Since the function doesn't use rejects anyway,
there's no need to tighten the type.

Fixes one of the strong_mode_static_type_error errors that is currently
being ignored.
2016-08-18 17:14:52 -07:00
Dragoș Tiselice
6e9bbca401 Added AnimatedSize. (#5260)
Added a widget that implicitly animates the size of it child.
2016-08-18 11:03:21 -07:00
Dragoș Tiselice
7bd4b5a9ab Added ExpandIcon widget. (#5463)
Added a widget that automaitcally rotates the expansion icon and
offers a callback interface that captures presses.
2016-08-18 09:27:29 -07:00
Dragoș Tiselice
77a1719cfb Changed IconButton not to exceed its splash size. (#5366)
Using IconButton inside of a bigger Material before would result
in having a hit box as large as the whole Material. This commit
constrains the size of the hit box and splashes to the default
diameter of a splash.
2016-08-18 09:26:03 -07:00
Adam Barth
a60fefc131 Improve test coverage (#5473)
These tests should hit some previously untested lines.
2016-08-17 18:18:07 -07:00
Dragoș Tiselice
508b8c460c Added a flag to divide Material slices. (#5402)
This commit changes MergeableMaterial to include a flag that
specifies whether connected Material slices should have dividers
between them.
2016-08-17 16:28:28 -07:00
Ian Hickson
9bb9dc0b28 Handle changing clip delegates (#5444)
Turns out that previously we weren't updating the clip if the layout
didn't change, even if the delegate was different.
2016-08-16 16:37:06 -07:00
Hans Muller
082730e94b Tapping status bar scrolls to top on IOS (#5425) 2016-08-16 12:30:39 -07:00
Ian Hickson
955b3e21f7 A Flutter logo widget. (#5382)
Instead of a PNG, the Flutter gallery widget is now drawn in code.

There's now a FlutterLogoDecoration class that paints the flutter logo
anywhere you can use a Decoration (e.g. AnimatedContainer).

There's now a FlutterLogo class that honors the IconTheme.

The About dialog box API now takes a Widget for the applicationIcon,
instead of an ImageProvider. It uses IconTheme to make the icon the
right size instead of using an Image widget.

Add padding, duration, and curve properties to the DrawerHeader.
Make the child of a DrawerHeader optional.

Clean up UserAccuntsDrawerHeader a bit.

Add some useful properties and methods to EdgeInsets.

Add some debug logic to RenderDecoratedBox to catch unpaired
save/restore calls when possible.

Make GestureDetector fill its parent if it has no children. Fixes
https://github.com/flutter/flutter/issues/5380
2016-08-15 12:50:24 -07:00
Ian Hickson
e2d0917ed6 GestureDetector fills its parent if child-less. (#5397)
Fixes https://github.com/flutter/flutter/issues/5380
2016-08-15 12:42:02 -07:00
Jason Simmons
529c25caa8 Update the AppBar scroll offset only if the body region is scrolled (#5343)
Fixes https://github.com/flutter/flutter/issues/5131
2016-08-11 16:51:46 -07:00
Dragoș Tiselice
9284dd40b7 Added MergeableMaterial Widget. (#5165)
MergeableMaterial is an animated container that knows how to merge
separate slices of Material together.
2016-08-11 15:22:25 -07:00
Dragoș Tiselice
de448c20e6 Added LayoutChangedNotifier. (#5304)
Added a simple widget that automatically dispatches a
LayoutChangedNotification when its child changes layout.
2016-08-11 15:12:04 -07:00
Dragoș Tiselice
fd119f4f59 Added clipping opt-out for Stack. (#5326)
Added a flag that instructs Stack how to deal with overflowing
children: they can either be clipped or not.
2016-08-11 15:01:16 -07:00
Ian Hickson
9c15407ba9 When a list is scrolling, children can't be tapped (#5222) (#5348) 2016-08-11 13:40:26 -07:00
Ian Hickson
17cdc88958 Improve our scroll physics on iOS (#5340)
Changes in this patch:
- iOS now uses a different scrollDrag constant than Android.
   - ScrollConfigurationDelegate now knows about target platforms.
   - ScrollBehaviors now know about target platforms.
   - RawInputLine now has to be told what platform it's targetting.
   - PageableList now has a concept of target platform.
- make debugPrintStack filter its stack.
   - move debugPrintStack to `assertions.dart`.
- add support for limiting the number of frames to debugPrintStack.
- make defaultTargetPlatform default to android in test environments.
- remove OverscrollStyle and MaterialApp's overscrollStyle argument. You
  can now control the overscroll style using Theme.platform.
- the default scroll configuration is now private to avoid people
  relying on the defaultTargetPlatform getter in their subclasses (since
  they really should use Theme.of(context).platform).
- fix some typos I noticed in some tests.
- added a test for flinging scrollables, that checks that the behavior
  differs on the two target platforms.
- made flingFrom and fling in the test API pump the frames.
- added more docs to the test API.
- made the TestAsyncUtils.guard() method report uncaught errors to help
  debug errors when using that API.
2016-08-11 11:31:30 -07:00
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