4756 Commits

Author SHA1 Message Date
Adam Barth
06e49c0942 PageableList should take initialPage instead of initialScrollOffset
Fixes #900
2015-10-05 21:36:23 -07:00
Adam Barth
1710c20d0d Merge pull request #1499 from abarth/rm_animated_component
Delete AnimatedComponent
2015-10-05 21:32:28 -07:00
Adam Barth
d9c44f2e45 Delete AnimatedComponent
This class has no clients.
2015-10-05 17:35:51 -07:00
Ian Hickson
6f82b1c903 Merge pull request #1496 from Hixie/focus
Fix Focus
2015-10-05 17:32:52 -07:00
Adam Barth
27f1359728 Merge pull request #1484 from abarth/snackbar_route
Use Navigator to drive SnackBar
2015-10-05 17:32:47 -07:00
Adam Barth
57002a4ab5 Merge pull request #1497 from abarth/create_performance_earlier
Create the Performance for a Route earlier
2015-10-05 17:32:41 -07:00
Adam Barth
5a1cf0b791 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
a5907c6f12 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
9f2429550c 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
Ian Hickson
74f85c7ae5 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
7be4dc4d63 Merge pull request #1489 from Hixie/cleanup
Add more debugging information to Widgets.
2015-10-05 13:59:56 -07:00
Ian Hickson
fa37693a0a Merge pull request #1488 from Hixie/RouteArguments
Simplify the usage of Navigator's routes argument
2015-10-05 13:59:45 -07:00
Hixie
3467f32a1f 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
Viktor Lidholt
ad130b3ef9 Merge pull request #1492 from vlidholt/master
Handle removal of sprite physics bodies during the physics simulation
2015-10-05 13:51:55 -07:00
Viktor Lidholt
d97a07c94c Handle removal of sprite physics bodies during the physics simulation 2015-10-05 13:47:51 -07:00
Hixie
01887db498 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
940d896456 Add more debugging information to Widgets.
Also, fix comment mentioning syncConstructorArguments.
2015-10-05 13:18:06 -07:00
Adam Barth
575a0dea5d Merge pull request #1487 from abarth/merge_curve_into_interval
Give Interval a Curve to apply between start and end
2015-10-05 12:43:44 -07:00
Adam Barth
80d1218487 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
Viktor Lidholt
74f8e53209 Merge pull request #1486 from vlidholt/master
Prevents sprite update methods to be called before the sprite box has…
2015-10-05 11:58:09 -07:00
Viktor Lidholt
f3b2cbba74 Prevents sprite update methods to be called before the sprite box has been property intialized 2015-10-05 11:24:59 -07:00
Adam Barth
ed821009a7 Merge pull request #1485 from abarth/animation_renames
Improves names of animation classes
2015-10-05 10:57:07 -07:00
Adam Barth
bcb0fe2fed Improves names of animation classes
Fixes #1170
2015-10-05 10:51:43 -07:00
Chinmay Garde
7ec9e44f96 Merge pull request #1462 from chinmaygarde/master
Allow displaying compositor statistics via a widget
2015-10-05 10:31:38 -07:00
Chinmay Garde
171b3b5ce3 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
4d7da9cfa0 Merge pull request #1483 from abarth/drawer_fail
Convert Drawer to using navigator
2015-10-05 10:27:53 -07:00
Adam Barth
84620c1584 Merge pull request #1480 from abarth/rm_animated_simulation
Remove AnimatedSimulation
2015-10-05 10:24:44 -07:00
Adam Barth
ec890ace01 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
6cb793e37e Remove AnimatedSimulation
This patch folds the functionality from AnimatedSimulation into Timeline.
2015-10-05 10:13:11 -07:00
Adam Barth
14cf4a1748 Merge pull request #1479 from mdakin/simplfy_digger
Simplfy resetting board and mine generation.
2015-10-04 15:21:53 -07:00
Adam Barth
647aba8f4a Merge pull request #1478 from abarth/simplify_animation
Simplify animation
2015-10-03 14:55:43 -07:00
Adam Barth
ac9aced746 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
Mehmet Akin
9f6d39a0ce Fix indent. 2015-10-03 22:56:30 +02:00
Adam Barth
9a60f4e129 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
75d4ee7eb6 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
cccb59dfb6 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
6c72e52d7a 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
Mehmet Akin
9c7b2ea79b Simplfy resetting board and mine generation. 2015-10-03 22:22:30 +02:00
Adam Barth
44dbe3c77d Merge pull request #1476 from abarth/ink_well_gestures
RenderInkWell should use gestures
2015-10-03 12:53:03 -07:00
Adam Barth
e5d34d9338 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
46a285fe42 Merge pull request #1477 from abarth/less_clever
Be a bit less clever with ??=
2015-10-03 01:41:09 -07:00
Adam Barth
66d7ffbb63 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
aab0424b6d Merge pull request #1475 from abarth/gesture_style
Clean up some style in GestureDetector
2015-10-02 23:54:27 -07:00
Adam Barth
bad67144f3 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
9bff9ef9d8 Merge pull request #1473 from abarth/super_style
Use `}) : super` consistently
2015-10-02 23:15:11 -07:00
Adam Barth
7b230cd127 Use }) : super consistently
Fixes #1372
2015-10-02 23:12:03 -07:00
Adam Barth
36c4e6e1fc Merge pull request #1458 from Hixie/dismiss-1215
Regression test for #1215
2015-10-02 23:05:57 -07:00
Adam Barth
463fdec361 Merge pull request #1467 from Hixie/app-help
Assert that App(routes) is not null.
2015-10-02 23:05:39 -07:00
Hans Muller
f6ed436a22 Merge pull request #1469 from HansMuller/mask
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:11:39 -07:00
Hans Muller
c985ed6739 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