Commit Graph

1013 Commits

Author SHA1 Message Date
Adam Barth
58c7fdef36 Add RawKeyboardListener
RawKeyboardListener makes it easier to listen for raw keyboard events.

Fixes #787
2016-01-25 20:37:22 -08:00
Ian Hickson
5494323db9 Move us to HashSet to avoid the overhead of tracking the order 2016-01-23 18:13:13 -08:00
Adam Barth
432bfb4729 Add material design features to Input
Properly support labels, hints, icons, and custom typography.
2016-01-23 00:21:18 -08:00
Adam Barth
4357d08714 Merge pull request #1344 from abarth/icon_color
Simplify colorizing icons
2016-01-22 12:53:41 -08:00
Adam Barth
82e30c8649 Simplify colorizing icons
Now you can colorize an Icon simply by proving a Color for the Icon.
2016-01-22 12:07:45 -08:00
Matt Perry
dcbb4960eb 'flutter apk' now supports dynamically registered services.
Third-party libraries can now provide their own mojo services. They do
so by adding a config.yaml file to their pub package which contains
- a list of service names and java classes which handles that service's
  registration.
- a list of pre-built .jar files to statically link with the app's shell
  when building the app.
2016-01-22 13:20:54 -05:00
Hans Muller
8218ff683f Change Block children to be a named parameter 2016-01-22 08:04:21 -08:00
Hans Muller
5ae1b41ca4 Added TwoLevelList 2016-01-21 16:27:18 -08:00
Adam Barth
f176ed27de Don't autofocus Input widgets by default
Instead, require the developer to opt-in to autofocusing because autofocusing
can be disruptive.

Fixes #1307
2016-01-21 14:11:50 -08:00
Hans Muller
7ca8608a06 Merge pull request #1315 from HansMuller/gallery_section_graphics
Add section images to the gallery home page
2016-01-20 16:39:30 -08:00
Adam Barth
b988a875ad Remove Performance and AnimatedValue
This patch removes Performance and AnimationValue now that we've ported the
framework over to AnimationController and Tween. This patch also cleans up the
names of the AnimationController classes now that they don't have to avoid
conflicts with the old animation API. Specifically, I've made the following
renames:

 * Animated -> Animation
 * Evaluatable -> Animatable
 * PerformanceStatus -> AnimationStatus

This patch is just renames and moving code around. There aren't any changes in
behavior.
2016-01-20 13:49:35 -08:00
Adam Barth
e459e7124a Port the remainder of the framework to AnimationController
There should be no more uses of Performance or AnimatedValue in the framework
or the examples.
2016-01-20 13:29:05 -08:00
Hans Muller
e1c53b65f7 Added section images to the gallery home page 2016-01-20 12:15:13 -08:00
Adam Barth
d25951c517 AnimatedBuilder should have a child
Providing a pre-built child is more efficient because we don't need to rebuild
the child every tick of the animation.
2016-01-20 09:10:34 -08:00
Adam Barth
0b098ee2e5 Move Scaffold over to using AnimationController
Also, clean up the class hierarchy for AnimationController now that
we've renamed progress to value. That means everything in the hierarchy
now has a value, include Watchable. This patch renames Watchable to
Animated<T>, which lets us use that type almost everywhere.

I've added some ducktape to modal bottom sheets to avoid having to
refactor all of Navigator to use AnimationController. I'll remove the
ducktape in the next patch.
2016-01-20 08:43:04 -08:00
Hans Muller
3f0cca02cb Revised Material Gallery demo 2016-01-19 17:02:32 -08:00
Adam Barth
fc978c1aa8 Port examples to the new animation API
These now use Animation and AnimationController instead of PerformanceView and
Performance.
2016-01-19 16:03:31 -08:00
Adam Barth
bc20871cb9 Introduce Tween and the new animation API
This patch removes state from the animation system, which was causing problems
as we were scaling the use of animated values.

Now the "tween" objects are stateless and can watch animations, which creates a
new object that holds both the tween and the animation instead of mutating the
tween every tick of the animation.

This patch ports one client as a proof-of-concept.

Fixes #215
2016-01-19 14:26:05 -08:00
Ian Hickson
aa701d44f6 Merge pull request #1257 from Hixie/shadows
More elaborate RenderBox example
2016-01-18 13:53:22 -08:00
Ian Hickson
9d155bdce5 Merge pull request #1285 from Hixie/activity
Activity clean-up
2016-01-17 22:33:59 -08:00
Ian Hickson
51566aeffa More elaborate RenderBox example
Also, some trivial fixes for things that I found while playing with
the rendering library directly.
2016-01-17 22:31:41 -08:00
Ian Hickson
96958b203e Merge pull request #1255 from Hixie/random-fixes
Include BoxDecoration description in Container toString
2016-01-17 22:30:19 -08:00
Ian Hickson
c03c4cca10 Activity clean-up
Turns out Android crashes if the colour is not opaque, so we enforce
that at the Dart level.

Also, since label and colour are both actually optional, make them
named arguments.
2016-01-16 12:18:32 -08:00
Hixie
df78ec2b24 fix framework to match new mojo sdk
The dart bindings changed semantics in a non-compatible way.
2016-01-15 17:05:21 -08:00
Seth Ladd
af250fc9cf fix links to new website 2016-01-15 13:08:27 -08:00
Hans Muller
179ca8164e Upgrade progress_indicator demo defend against null color in updateTaskDescription 2016-01-15 08:41:57 -08:00
Ian Hickson
8c44c38299 Include BoxDecoration description in Container toString
Have BoxDecoration default to one-line dumps

Style nits in a rendering example
2016-01-14 22:20:43 -08:00
Hixie
24cab8999c Tooltips
Introduces a new Tooltip class.
Adds support for tooltips to IconButton and Scaffold.
Adds some tooltips to various demos.

Also some tweaks to stack.dart that I made before I decided not to go
down a "CustomPositioned" route.
2016-01-14 12:21:56 -08:00
Adam Barth
174164bc15 Switch back to GitHub hosting of stock data
The Firebase server seems to have changed behavior and is not giving us a List
instead of a Map. This patch switches us back to GitHub, which just serves the
same flat files all the time.
2016-01-14 09:37:43 -08:00
Adam Barth
193ed22b63 Merge pull request #1197 from abarth/rm_clamp
Remove clamp() in favour of double.clamp()
2016-01-13 11:01:41 -08:00
Adam Barth
d444ae7dc8 Update engine
Also, update callers of deprecated methods.
2016-01-12 12:24:07 -08:00
Hans Muller
cafea7f51f Floating Action Button transitions 2016-01-12 11:42:20 -08:00
Adam Barth
8e5dd7a385 Remove clamp() in favour of double.clamp()
Fixes #961
2016-01-12 09:19:33 -08:00
Ian Hickson
867bbcc9bd Provide a safe time to update a WidgetToRenderBoxAdapter
If you change the RenderObject tree between frames, you'll assert if
you subsequently hit test. So e.g. if you get two button presses back
to back, and you mutate the tree synchronously in response to the
first one, the second will assert.

This adds an onBuild callback to WidgetToRenderBoxAdapter to make it
easier to do the updates at the right time, i.e., during widget build.
It'll be called whenever you rebuild the WidgetToRenderBoxAdapter
itself, so all you have to do to use it is call setState() on whoever
is building the WidgetToRenderBoxAdapter.
2016-01-11 23:14:37 -08:00
Adam Barth
82bb3bd40d ShaderMask needs to play nicely with compositing
This patch adds ShaderLayer and makes ShaderMask use it.

Fixes #1155
2016-01-11 21:57:54 -08:00
Ian Hickson
8f894f3757 Merge pull request #1140 from Hixie/concat
Transition callers from 'concat' to 'transform'
2016-01-11 20:05:07 -08:00
Alex Fandrianto
9bf16fbd6a Also update piano.dart 2016-01-11 18:53:32 -08:00
Adam Barth
056766414c Use a named argument for Widget children
Previously we used a positional argument for widgets that had multiple
children. Now we use a named argument that defaults to an empty list.

Fixes #241
2016-01-11 13:17:09 -08:00
Ian Hickson
d869c01035 Merge pull request #1181 from Hixie/stats-box-rename
Rename StatisticsOverlay to PerformanceOverlay.
2016-01-11 12:21:32 -08:00
Adam Barth
b2cef9f2b2 Rename ScrollDirection to Axis
We use the ScrollDirection for more than just scrolling.

Fixes #151
2016-01-11 11:28:42 -08:00
Matt Perry
1343a02032 Add Flutter GCM package and extend fitness app to use GCM. 2016-01-11 13:45:32 -05:00
Ian Hickson
88c43c3f4e Rename StatisticsOverlay to PerformanceOverlay. 2016-01-10 23:47:42 -08:00
Ian Hickson
48e1350e73 Add more debugging options to the stocks app.
- Add an option to enable debugPaintSizeEnabled.
- Add an option to enable the StatisticsOverlay.
- Add support for the StatisticsOverlay in MaterialApp.
- Change the layout behaviour of RenderStatisticsBox:
   - Give it a zero intrinsic width.
   - Give it an accurate intrinsic height that depends on the flags
     set. (Also, move the enum to the rendering/ layer from the
     widgets/ layer to enable this.)
   - Make the box automatically size itself full-width and the correct
     height, so that you can actually embed it (though most of the
     time you'd just put it in a Stack so this doesn't matter as
     much, really).
- Some style nit fixes in statistics_box.dart.
2016-01-10 22:42:16 -08:00
Adam Barth
dd08bf7973 Simplify TabView API
Instead of taking a builder and a generic type, we can just take a
List<Widget>.
2016-01-10 21:44:24 -08:00
Ian Hickson
34cfb6082a Refactor the Stocks app's settings
This will make it much easier to add more settings.
2016-01-10 00:36:01 -08:00
Ian Hickson
d9d3114d14 Material baseline grid
See https://www.google.com/design/spec/layout/metrics-keylines.html#
2016-01-08 11:18:15 -08:00
Ian Hickson
17ef9488ff Transition callers from 'concat' to 'transform'
See: https://github.com/flutter/flutter/issues/1080
2016-01-08 08:58:31 -08:00
Hans Muller
1b11336ee6 Page Selector gallery demo 2016-01-07 08:27:13 -08:00
Adam Barth
e64d93a520 Switch PageableList over to using RenderList
This patch moves PageableList off HomogeneousViewport and onto RenderList and
friends, making it match the new ScrollableList.
2016-01-06 15:28:01 -08:00
Adam Barth
627c1ffb5c Replace ScrollableList with ScrollableList2
ScrollableList2 is complete and subsumes all the use cases for the original
ScrollableList.
2016-01-06 11:16:57 -08:00