1024 Commits

Author SHA1 Message Date
Kris Giesing
cc201f3293 Temporary holding commit 2015-10-09 11:17:07 -07:00
Kris Giesing
79c88b4d7c Merge remote-tracking branch 'upstream/master' 2015-10-06 12:53:54 -07:00
Hans Muller
cf17dd9687 Merge pull request #1509 from HansMuller/remove_popup_menu_margin
Remove PopupMenu margin

The margins make using showMenu's menuPosition argument difficult and they're not really needed.

I also made a few small gratuitous changes in navigator.dart.
2015-10-06 11:03:23 -07:00
Hans Muller
56d9d85f2a Remove PopupMenu margin
The margins make using showMenu's menuPosition argument difficult and they're not really needed.

I also made a few small gratuitous changes in navigator.dart.
2015-10-06 10:55:31 -07:00
Adam Barth
8b1effc544 NetworkImage occasionally does not grab the image
I haven't been able to reproduce this bug consistently, but my theory is that
the ImageDecoder was being garbage collected before it called its completion
callback. This patch prevents that by keeping a reference to the image decoder
while the callback is in flight.

Fixes #801
2015-10-06 10:37:55 -07:00
Adam Barth
2d0d1645be Merge pull request #1503 from abarth/simplify_scaffold
Simplify Scaffold
2015-10-06 10:09:35 -07:00
Adam Barth
932626aad1 Merge pull request #1504 from abarth/tab_shadow
ToolBar with a TabBar shouldn't have a shadow
2015-10-06 10:08:11 -07:00
Adam Barth
89a09822bf Simplify Scaffold
Rather than using a custom render object, we can just use a Stack.
2015-10-06 10:06:17 -07:00
Adam Barth
ee0c01c54c Merge pull request #1501 from abarth/initial_page
PageableList should take initialPage instead of initialScrollOffset
2015-10-06 09:51:35 -07:00
Adam Barth
7f6346789f Rev pub package 2015-10-06 09:51:00 -07:00
Adam Barth
6c30e01bef Make MimicableState public again
This state object has a public API.
2015-10-06 09:33:33 -07:00
Adam Barth
6cf105fe3e ToolBar with a TabBar shouldn't have a shadow
This patch makes the level of the ToolBar configurable. I've also cleaned up
the Tab code slightly.

For some reason, there's still a hairline between the ToolBar and the TabBar.
We might need to rethink how we draw the background a bit here.

Fixes #1454
2015-10-05 23:41:14 -07:00
Adam Barth
922aece1d5 Mark most State subclasses private
In the vast majority of cases, folks should be interacting with the Widget
rather than its State.

Fixes #267
2015-10-05 21:54:33 -07:00
Adam Barth
7ac6ab6fc7 PageableList should take initialPage instead of initialScrollOffset
Fixes #900
2015-10-05 21:36:23 -07:00
Adam Barth
330af86bdc Delete AnimatedComponent
This class has no clients.
2015-10-05 17:35:51 -07:00
Ian Hickson
012c5d94a1 Merge pull request #1496 from Hixie/focus
Fix Focus
2015-10-05 17:32:52 -07:00
Adam Barth
5a359dce9f Merge pull request #1484 from abarth/snackbar_route
Use Navigator to drive SnackBar
2015-10-05 17:32:47 -07:00
Adam Barth
706b272eaf Create the Performance for a Route earlier
Instead of waiting until build(), we now create the performance for a route in
its constructor.
2015-10-05 17:20:08 -07:00
Adam Barth
2eec30111a Use Navigator to drive SnackBar
Now SnackBar is an ephemeral route that uses a Placeholder to put itself into
the Scaffold.

Fixes #673
2015-10-05 17:12:50 -07:00
Hixie
fbf8174c87 Fix Focus
Focus.at() and company should be on Focus, not FocusState.

_notifyDescendants() was using the wrong runtimeType.

Let InheritedWidget update the descendants during build.

When you setState() during build, assert that you're not
markNeedsBuild()ing someone who isn't a descendant.

Typo in Widget.toString().
2015-10-05 16:41:50 -07:00
Kris Giesing
43a5dff843 Merge remote-tracking branch 'upstream/master' 2015-10-05 15:07:03 -07:00
Ian Hickson
48142d6872 Merge pull request #1490 from Hixie/navigator-ensure-pop
Handle a route being dismissed before being popped
2015-10-05 13:59:59 -07:00
Ian Hickson
4913c4fc7d Merge pull request #1489 from Hixie/cleanup
Add more debugging information to Widgets.
2015-10-05 13:59:56 -07:00
Hixie
90a0f6300f Simplify the usage of Navigator's routes argument
(These are changes cherry-picked from in-flight branches since they are
more independent and could be helpful even without those changes.)

- Change RouteBuilder's signature to take a single argument in which the
  other fields are placed, so that we can keep iterating on those
  arguments without having to break compatibility each time. Also, this
  makes defining route builders much simpler (only one argument to
  ignore rather than a variable number).

- Expose the next performance to RouteBuilders, since sometimes the
  route itself might not be where it's used.

- Allow BuildContext to be used to walk children, just like it can for
  ancestors

- Allow BuildContext to be used to get the Widget of the current
  BuildContext

- Allow StatefulComponentElement to be referenced with a type
  specialisation so that you don't have to cast when you know what the
  type you're dealing with actually is.
2015-10-05 13:59:30 -07:00
Hixie
290ed842b2 Handle a route being dismissed before being popped
Ensure that if a route's performance is dismissed before the route is
popped, that we pop the route.
2015-10-05 13:38:07 -07:00
Hixie
f5834c9abe Add more debugging information to Widgets.
Also, fix comment mentioning syncConstructorArguments.
2015-10-05 13:18:06 -07:00
Adam Barth
3a31f5f772 Give Interval a Curve to apply between start and end
This patch simplifies AnimationTiming and all the AnimatedValue base classes.
Also, make PopupMenu a stateless component because it has no state.

Fixes #1168
2015-10-05 12:10:48 -07:00
Adam Barth
da685ec28a Merge pull request #1485 from abarth/animation_renames
Improves names of animation classes
2015-10-05 10:57:07 -07:00
Adam Barth
3f82552d22 Improves names of animation classes
Fixes #1170
2015-10-05 10:51:43 -07:00
Chinmay Garde
850df83eeb Merge pull request #1462 from chinmaygarde/master
Allow displaying compositor statistics via a widget
2015-10-05 10:31:38 -07:00
Chinmay Garde
3e916982c4 Allow displaying compositor statistics via a widget
Example:
  import 'package:sky/widgets.dart';
  void main() => runApp(new Center(child:
      new StatisticsOverlay.allEnabled()));
2015-10-05 10:30:19 -07:00
Adam Barth
bc9d004cf0 Merge pull request #1483 from abarth/drawer_fail
Convert Drawer to using navigator
2015-10-05 10:27:53 -07:00
Adam Barth
49c4787698 Convert Drawer to using navigator
This patch converts drawer to using the "openDialog" pattern for managing its
state. Currently, the drawer entrance and exit animation aren't integrated with
the navigator's animation system because the drawer's animations can be stopped
and reversed, which the navigator can't yet understand. That means dismissing
the drawer via the system back button causes the drawer to be removed
instanteously.

Fixes #715
Fixes #1187
2015-10-05 10:24:19 -07:00
Adam Barth
5cb0010085 Remove AnimatedSimulation
This patch folds the functionality from AnimatedSimulation into Timeline.
2015-10-05 10:13:11 -07:00
Adam Barth
49aba0cc0c Simplify Scrollable animations
Rather than having two objects driving scrolling animations, we now have one
object, a Timeline, drive both scrollTo and fling animations. Using Timeline
instead of AnimatedSimulation paves the way to removing AnimatedSimulation
(which is now used only inside the animation library).

Finally, this patch also simplifies (and makes private) _TweenSimulation by
using AnimatedValue to do the math.
2015-10-03 14:08:20 -07:00
Adam Barth
203e6fd7e8 Make Ticker start ticking at zero Duration
The only client wants a zero-based duration.
2015-10-03 13:48:57 -07:00
Adam Barth
db191e96bd Switch scheduler over to Duration
This patch prepares us to switch to using integers when handing off the
animation time from the engine to the framework.
2015-10-03 13:48:57 -07:00
Adam Barth
472c440396 Merge pull request #1474 from abarth/hit_zero
Force AnimatedVariables to hit begin on 0.0
2015-10-03 13:48:33 -07:00
Adam Barth
34238dd879 Force AnimatedVariables to hit begin on 0.0
We already forced hitting end on 1.0.

Fixes #1358
2015-10-03 13:41:20 -07:00
Adam Barth
cf88993492 RenderInkWell should use gestures
After this patch, InkWell is driven by gesture recognizers, which lets us
cleanly cancel splashes when the user actually scrolls.

I've also refactored all the clients of InkWell to use InkWell to detect
gestures instead of wrapping InkWell in a GestureDetector.

Fixes #1271
2015-10-03 12:49:34 -07:00
Adam Barth
445c512d2c Be a bit less clever with ??=
Turns out .. binds tigher than ??= according to
https://www.dartlang.org/docs/dart-up-and-running/ch02.html#operators, which
means we were only updating the callbacks when we first created the
recognizers. Now we update them unconditionally.
2015-10-03 01:37:01 -07:00
Adam Barth
426ce9374e Clean up some style in GestureDetector
* Rename GestureTapListener (and friends) To GestureTapCallback to match the
   other gesture callbacks.
 * Replace "ensureFoo" pattern with ??= operator.
2015-10-02 23:50:23 -07:00
Adam Barth
e9aabcd5c6 Use }) : super consistently
Fixes #1372
2015-10-02 23:12:03 -07:00
Adam Barth
7271698496 Merge pull request #1458 from Hixie/dismiss-1215
Regression test for #1215
2015-10-02 23:05:57 -07:00
Adam Barth
aea7792912 Merge pull request #1467 from Hixie/app-help
Assert that App(routes) is not null.
2015-10-02 23:05:39 -07:00
Kris Giesing
c9986651f4 Fix #1471 Add double tap gesture 2015-10-02 18:49:38 -07:00
Hans Muller
4de0a99b3f ShaderMask
The ShaderMask widget enables rendering its child with an alpha channel defined by a Shader. For example if the Shader was a linear gradient in alpha then the component behind the ShaderMask's child would appear wherever the gradient's alpha value was not fully opaque.

The card_collection.dart example demonstrates this. Select the "Let the sun shine" checkbox in the app's drawer.
2015-10-02 17:08:00 -07:00
Adam Barth
274d2986fe Merge pull request #1463 from abarth/animated_container
Add AnimatedContainer
2015-10-02 16:34:32 -07:00
Adam Barth
c88ca5dbdc Add AnimatedContainer
This widget is used in Material and Drawer. We don't currently support
animating towards null, but we can add that in a future patch.
2015-10-02 15:53:12 -07:00
Adam Barth
56c8e60b04 Detecting just Pan events causes an exception in GestureDetector
Fixes #1320
2015-10-02 15:36:41 -07:00