307 Commits

Author SHA1 Message Date
Adam Barth
9f736f197b Reattach fitness to the build
We can build Fitness again now that playfair has been updated to account for
the package:flutter rename.
2015-10-12 00:24:24 -07:00
Adam Barth
4d0b7911a0 Import dart:ui as ui (instead of as sky) 2015-10-09 20:55:54 -07:00
Adam Barth
dca1370bc6 Rename package:sky to package:flutter 2015-10-09 20:44:52 -07:00
Adam Barth
72c103cefa Rename dart:sky to dart:ui 2015-10-09 19:27:13 -07:00
Adam Barth
6483ebeecc Rename App to MaterialApp
MaterialApp assumes that you're using material design.

Also move radial reaction and fix imports for stats box.
2015-10-09 10:27:22 -07:00
Adam Barth
3b06c85c6d Split material design widgets out of widgets.dart
These are now part of material.dart.
2015-10-09 10:07:06 -07:00
Hixie
939cbe5451 Have Flat buttons set their default text styles.
Also, have dialog buttons use the accent colour.
Also, generally rationalise some of this stuff to match Material better.
2015-10-08 16:49:57 -07:00
Viktor Lidholt
98eb54a53c Merge pull request #1541 from vlidholt/master
Adds support for keeping track of contact points in physics
2015-10-08 16:20:40 -07:00
Viktor Lidholt
ed999dca02 Updates sprite physics test 2015-10-08 16:13:56 -07:00
Adam Barth
4e8ee23a1a Remove ButtonState
Clients should just use a GestureDetector (or an InkWell) instead.
2015-10-08 10:26:34 -07:00
Hans Muller
2271340920 IndexedStack
Added horizontal and vertical alignment properties to Stack so that the origin of non-positioned children can be specified. Currently all of the non-positioned children just end up with their top-left at 0,0. Now, for example, you can center the children by specifying verticalAlignment: 0.5, horizontalAlignment: 0.5.

Added IndexedStack which only paints the stack child specified by the index property. Since it's a Stack, it's as big as the biggest non-positioned child. This component will be essential for building mobile drop down menus.

Added a (likely temporary) example that demonstrates IndexedStack.
2015-10-08 10:21:24 -07:00
Hixie
5f833fccce HomogeneousViewport support for Theme.of()
Previously, RenderObjectElements didn't support being marked dirty. This
is fine, except for MixedViewport and HomogeneousViewport, which have
builder functions to which they hand themselves as a BuildContext. If
those builder functions call, e.g., Theme.of(), then when the theme
changes, the Inherited logic tries to tell the RenderObjectElement
object that its dependencies changed and that doesn't go down well.

This patch fixes this by making RenderObjectElement a BuildableElement,
and making MixedViewport and HomogeneousViewport hook into that to
rebuild themselves appropriately.

Also, this was only found at all because ThemeData didn't implement
operator==, so we were aggressively marking the entire tree dirty all
the time. That's fixed here too.

Also, I changed card_collection.dart to have more features to make this
easier to test. This found bugs #1524, #1522, #1528, #1529, #1530, #1531.
2015-10-07 15:53:50 -07:00
Hans Muller
6f1d79ed18 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
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