294 Commits

Author SHA1 Message Date
Adam Barth
398400a3bc Merge pull request #1503 from abarth/simplify_scaffold
Simplify Scaffold
2015-10-06 10:09:35 -07:00
Adam Barth
7d5412eb60 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
6601b5dfa9 Simplify Scaffold
Rather than using a custom render object, we can just use a Stack.
2015-10-06 10:06:17 -07:00
Viktor Lidholt
eb2709eafe Merge pull request #1506 from vlidholt/master
Fixes to demo game
2015-10-06 09:57:21 -07:00
Viktor Lidholt
bf4342fa9a Adds default text style 2015-10-06 09:28:05 -07:00
Adam Barth
8e1583af38 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
Ian Hickson
6f82b1c903 Merge pull request #1496 from Hixie/focus
Fix Focus
2015-10-05 17:32:52 -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
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
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
Adam Barth
bcb0fe2fed Improves names of animation classes
Fixes #1170
2015-10-05 10:51:43 -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
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
14cf4a1748 Merge pull request #1479 from mdakin/simplfy_digger
Simplfy resetting board and mine generation.
2015-10-04 15:21:53 -07:00
Mehmet Akin
9f6d39a0ce Fix indent. 2015-10-03 22:56:30 +02: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
Mehmet Akin
9c7b2ea79b Simplfy resetting board and mine generation. 2015-10-03 22:22:30 +02: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
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
7b230cd127 Use }) : super consistently
Fixes #1372
2015-10-02 23:12:03 -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
Viktor Lidholt
4a7e6e9bcf Updates work with latest Flutter changes 2015-10-02 15:10:02 -07:00
Viktor Lidholt
b3dc369bd0 Sprite physics, first iteration 2015-10-02 14:15:14 -07:00
Hixie
68f0b69bd0 Groundwork for heroes transition in Stocks app
Identify specific parts of a Stock row with a Global Key that can be
regenerated later, and pass that key back to event handlers so they can
use them to do the transition.
2015-10-02 10:20:08 -07:00
Hixie
d726c2780d Draggable offsets and fix default drag feedback
You can now set an offset that will be used for the hit testing for
drops. (It doesn't move the feedback by default; use a Transform for
that.) I also made the default feedback not be Opacity 0.5 always.
2015-10-01 17:13:03 -07:00
Adam Barth
55481ed387 Merge pull request #1444 from abarth/float64
Moves from vector_math to vector_math_64
2015-10-01 15:37:20 -07:00
Hixie
3e0c6d586e EdgeDims changes and other fixes to core classes.
- Rename EdgeDims constructor to EdgeDims.TRBL().

- Add operator== to Size and Offset so that you can compare Size to
  DebugSize in checked mode.

- Add Size.lerp().

- Add various operators to EdgeDims. (*, /, ~/, %)

- Add EdgeDims.lerp().

- Update style guide. I went there to fix an EdgeDims constructor
  example, and stayed because some recent things came up and I wanted to
  add them before I forgot.
2015-10-01 15:34:04 -07:00
Adam Barth
8cf43b65d2 Moves from vector_math to vector_math_64
* Moves from vector_math to vector_math_64
* Adds support for Float64List in Dart bindings
2015-10-01 14:46:13 -07:00
Hixie
7ff632d140 Stocks app used RouteState, now renamed StateRoute 2015-10-01 13:31:18 -07:00
Collin Jackson
ef32f71b80 Merge pull request #1434 from collinjackson/decode_lists
Support for decoding images in lists
2015-10-01 13:24:08 -07:00
Ian Hickson
d51d8197a4 Merge pull request #1437 from Hixie/mixed_viewport_demo
Remove the mixed_viewport demo
2015-10-01 13:22:45 -07:00
Collin Jackson
8af98ef93c Fix spinning_image URL to one that works 2015-10-01 13:16:53 -07:00
Hixie
7f6897a190 Remove the mixed_viewport demo
It's redundant with card_collection.dart, which does similar things but
much better.
2015-10-01 12:53:34 -07:00
Hixie
1c24af030c Port overlay_geometry.dart demo.
This removes GlobalKey.currentElement in favour of GlobalKey.currentContext.
2015-10-01 12:50:49 -07:00
Adam Barth
2df5d1ada7 Update playfair to a version that supports fn3 2015-10-01 09:54:31 -07:00
Adam Barth
feb70684f5 Make fn3 the default widget framework 2015-10-01 09:48:35 -07:00
Adam Barth
d7e3388b13 Remove unused imports 2015-10-01 09:30:31 -07:00
Adam Barth
9d63bb1381 Port SkySprites and clients to fn3 2015-10-01 09:26:19 -07:00
Adam Barth
c5e8833b4e Port demo_launcher and fitness to fn3 2015-10-01 09:07:17 -07:00
Adam Barth
63766316c6 Merge pull request #1416 from mdakin/minedigger2
Fix bounds checking error I introduced in previour cl, Address style …
2015-10-01 08:30:36 -07:00
Collin Jackson
387ddf16b7 Merge pull request #1220 from collinjackson/scaling_focus
Ensure that the item under the focal point stays in the same place despite zooming
2015-10-01 07:27:54 -07:00
mdakin
2e562b95c1 Fix bounds checking error I introduced in previour cl, Address style issues. 2015-09-30 23:15:55 +02:00
Hans Muller
b77990cc2e Snap scrolling: additional tests, cleanup 2015-09-30 14:13:11 -07:00
Adam Barth
05d4f1b8aa Remove BuildContext argument to initState
This argument isn't needed anymore now that State has a getter for context.
2015-09-30 13:15:46 -07:00
Ian Hickson
a406c96f76 Merge pull request #1405 from Hixie/dynamic-routes
Dynamic named routes
2015-09-30 09:54:27 -07:00
Hixie
1357f2bb4c Dynamic named routes
Make it possible for named routes to be generated on the fly.

To demonstrate this, you can now long-press a stock to open it.

Next steps:

 - transitions between (named) states that follow full material logic,
   e.g. in the case of the stock row to stock page transition, expanding
   the row into a raised sheet of material and expanding it to fit the
   screen, leaving the toolbar in place but cross-fading the old
   contents to the new contents.

 - more information in the stock view.

While I was here I also made Material have an opinion about default text
style, so if you forget to set one, it just uses body1.

Also, fixed bugs introduced recently that made RouteState and MenuRoute
not work properly.
2015-09-30 09:03:58 -07:00
mdakin
0d6170a235 Fix alignment of mine counts, simplfy code a bit. 2015-09-30 15:11:42 +02:00