2421 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
Hans Muller
243b4c065b Ease Material route animations (#5487) 2016-08-19 10:01:14 -07:00
Hans Muller
03b117a5e5 Remove the "most valuable keys" Hero feature (#5500) 2016-08-19 09:59:39 -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
a4ea12c470 Recognize Fuchsia as a target platform (#5451)
Currently, we just treat Fuchsia as TargetPlatform.android, but we might
want to do something more sophisticated in the future.
2016-08-17 18:24:08 -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
Ian Hickson
998273a3bc Turn off debugPaintPointersEnabled (#5441)
I accidentally checked in this as true in my patch improving this feature.
2016-08-16 14:59:02 -07:00
Ian Hickson
3c51648fa6 Improve the debugPaintPointersEnabled feature. (#5435)
We have so many render objects going on these days that showing every
box that gets an event just makes the screen blue. This limits it down
to only the ones that are actually doing something with the events.
2016-08-16 14:52:07 -07:00
Hans Muller
082730e94b Tapping status bar scrolls to top on IOS (#5425) 2016-08-16 12:30:39 -07:00
Ian Hickson
0d7363322f Fix the logo widget (#5414)
Some tweaks to the logo widget:

* remove bad assert
* allow text color to be configured
* make logo pretty in dark mode in gallery
* fix some docs
2016-08-15 16:02:53 -07:00
Hans Muller
6e62df42b6 Removed unnecessary Shrine hero logic (#5394)
* Removed unnecessary Shrine hero logic
2016-08-15 14:23:53 -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
Dragoș Tiselice
c0a71e341c Added global keys to Material slices. (#5386)
Because parent structure changes when slices gets separated and
merged, children widgets can be rebuilt redundantly. This commit
adds a global key to each child so that the framework always knows
its children apart.
2016-08-15 11:13:13 -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
Ian Hickson
a194e59390 Support multilicense LICENSE files generically. (#5310)
Also, add a "flutter build flx --report-licensed-packages" option for
when you need to get the list of the packages affected by licenses.
2016-08-09 20:03:14 -07:00
John McCutchan
6b3766d661 Send FirstFrame event after reassemble (#5314) 2016-08-09 15:31:48 -07:00
Ian Hickson
95f2e981da Provide an observatory extension to evict resources (#5241)
...so that you can use hot reload mode to update assets.
2016-08-09 11:25:43 -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
Bob Nystrom
b504fd428c Fix covariant overrides in SynchronousFuture. (#5262)
* Fix covariant overrides in SynchronousFuture.

There were two things going on here. In timeout(), the callback's return
type was needlessly tightened to only allow callbacks that return
futures. This makes SynchronousFuture not substitutable with Future,
whose timeout() allows callbacks that return immediate values.

Since SynchronousFuture.timeout() never calls the callback anyway, I
just loosened it to match Future.timeout().

SynchronousFuture.whenComplete() is just wrong. The type error, again,
is that the callback's return type is too tight. Future.whenComplete()
allows synchronous callbacks.

But the actual implementation is wrong as well. whenComplete() should
return a future that completes to the *original value*, not whatever the
callback returns.

So I just fixed the method to work correctly, including handling
callbacks with synchronous results.

* "(error, stackTrace)" -> "(e, stack)".
2016-08-05 15:18:07 -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
Hans Muller
eebe09d402 Set the ScrollConfiguration for dropdown menus (#5255) 2016-08-05 12:57:29 -07:00
Bob Nystrom
47139f1da9 Fix a couple of covariant overrides in Expression. (#5257)
It was widening the return type of a couple of operators compared to
what EquationMember declared it should return. Since it did in fact
always return an Expression, the widening wasn't needed.

This just tightens them to match the base class.
2016-08-05 12:16:58 -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
4cc094ac9f Remove pop in AppBar hero animations (#5243)
Now the flexible space bar computes its effect from its size rather than from
the Scaffold's animation.
2016-08-05 09:30:45 -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
Adam Barth
628884a8a8 Make AppBar a Hero (#5214)
This patch improves the Post and Shrine transitions by making the AppBar
into a Hero and changing the default MaterialPageTransition. Now the
AppBar transitions smoothly between screens and the
MaterialPageTransition doesn't involve a fade effect.

Also, rejigger the bounds of the image header in Pesto to avoid the
"pop" at the end of the animation by laying out the image header at its
final visual size instead of relying on occlusion to size the image
header.

Fixes #5202
Fixes #5204
2016-08-04 13:05:18 -07: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
Ian Hickson
1aeea6263a Fix some misuse of types (#5197)
Thanks to @leafpetersen for catching these.
2016-08-03 13:18:41 -07:00
Ian Hickson
c8db0041d8 Add debugPrintTransientCallbackRegistrationStack (#5198)
Adds Scheduler.debugPrintTransientCallbackRegistrationStack so that you
can find out how your current callback got registered.
2016-08-03 13:18:02 -07:00
Ian Hickson
d7fb51a551 Hot reload UI polish (#5193)
* General improvoments to the loader app:
   * Show a message after 8 seconds if no connection comes in.
   * Show a progress bar as files are being uploaded.
   * Hide the spinner just before launching the application.

* General improvements to the "flutter run" UI:
   * Add "?" key as a silent alias for "h".
   * Make the help text bold so it doesn't get mixed with the logs.
   * Make "R" do a cold restart when hot reload is enabled.

* Supporting features and bug fixes:
   * Add support for string service extensions.

* Other bug fixes:
   * Expose debugDumpRenderTree() outside debug mode.
   * Logger.supportsColor was missing a getter.
   * Mention in the usage docs that --hot requires --resident.
   * Trivial style fixes.
2016-08-02 16:52:57 -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
Adam Barth
4086e7a3c3 Improve performance of Pesto hero animation (#5182)
Previously we were resizing a paragraph of text during the animation. Now we
animate the text and the image separately. Also, add a default hero tag for
FloatingActionButton so that it animates as part of the hero transition as
well.
2016-08-02 11:35:15 -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