Move the animation libraries into src/animation and change importers to use
package:sky/animation.dart. Also, move scheduler.dart into the animation
library so that the animation library can be self-contained.
Very simple so far. This schedules an alarm to fire once a day, kicking
off a service that downloads a new app.skyx from a hardcoded URL. The
new skyx replaces the current one.
Add a way of having keys based on numeric types or DateTimes by having a ValueKey<T> class.
Remove the redundant ways of declaring things, except for leaving one shorthand -- you can say `new Key(s)` instead of `new ValueKey<String>(s)`.
This still leaves Flex and FlexDirection available. At some point once
people have transitioned to Row/Column we should rename Flex to _Flex
and stop reexporting FlexDirection from basic.dart.
SnackBar's crash if you fail to provide a showing bool.
I tried to edit it in the framework, but this seemed easier for now.
The snackbar still shows behind the keyboard unfortunately.
https://github.com/domokit/sky_engine/issues/810
@collinjackson
I'm not sure this is the correct approach, but it
at least mitigates https://github.com/domokit/sky_engine/issues/804
for now.
I also made it not crash if you haven't set a goalWeight.
@collinjackson
These widgets were designed in CSS where you need to specify a layout model for
your children. This patch updates them to the modern style of just taking a
unique child.
Fixes#755
- PageableList extends ScrollableList
One fixed width or height item is visible and centered at a
time. Fling and drag gestures scroll to the next/previous item.
- Scrollable.scrollTo(), Scrollable.scrollBy(), ensureWidgetIsVisible() API changed
The named animation parameter for these methods was replaced by
duration and curve. All of the methods now return a Future. The Future
completes when the scroll does.
This change eliminates the need for Scrollable to temporarily take ownership
of a ValueAnimation object (see #645).
- Using Future.then() instead of an AnimationPerformance status listener
In ensure_visible.dart _handleTap() uses ensureWidgetIsVisible() to
center the card roughly as before and then. When the implicit scroll
animation is complete, it changes the centered card's label font. The
change is made when the Future returned by ensureWidgetIsVisible()
completes.
- FixedHeightScrollable's itemHeight parameter is now itemExtent
If scrollDirection is ScrollDirection.vertical (the default) then itemExtent should
be the height of each item; otherwise it should be the width of each item.
Replaced _velocityForFlingGesture() in scrollable.dart with Scrollable._eventVelocity()
The original version clamped pixels/ms against pixels/sec constants. The new version
also deals with scrollDirection.
- Plumbed scrollDirection though FixedHeightScrollable and ScrollableList
Both classes should now support horizontal scrolling.
... and reattach fitness to the build. We detached fitness from the build
because it was seeing an old version of playfair that didn't work with the most
recent version of the Sky package.
This introduces the concept of an Anchor, which you can use to link
transitions together. I've used this in the Fitness and Stocks apps to
link the FAB and SnackBar to animate together by sharing the
SlideTransition.
I also fixed the Scaffold hit testing code to apply sub-widget
transforms, so it works with Transformed nodes.
Now it wont crash on save, but it still doesn't display
the error message in a snackbar and this also doesn't
wire up the enter/go key to actually do anything.
We'll need to implement performEditorAction on our
InputConnection implementation to catch this key and
pass it along to dart.
Our Input control needs to get more powerful to handle things
like this, including filtering of input.
The code was crashing by triggering a bug in the SnackBar
which didn't assert for actions, but crashed when they
were not null.
Partial fix for https://github.com/domokit/sky_engine/issues/543
@abarth