274 Commits

Author SHA1 Message Date
Hans Muller
73d7378cee Support undo in the leave-behind demo 2016-03-08 15:31:29 -08:00
Hans Muller
2662ea5283 Added support for List leave-behind items 2016-03-07 14:50:25 -08:00
Hans Muller
44cd57f2f2 Add DismissDirection onDismissed() callback parameter 2016-03-03 11:47:15 -08:00
Hans Muller
f1659e4f7a more type parameters 2016-03-03 10:18:53 -08:00
Adam Barth
6d2a6ff7c9 Merge pull request #2322 from abarth/analyzer_fix
Fix analyzer warning
2016-03-02 10:23:14 -08:00
Adam Barth
3d2e46acd2 Fix analyzer warning 2016-03-02 10:14:56 -08:00
Adam Barth
bfc39aa843 Remove IconThemeColor
This enum doesn't make sense anymore now that we can arbitrarily colorize
icons.  Instead, we just use a Color, which is both simpler and can be
interpolated during animations.

Fixes #1279
2016-03-02 10:11:42 -08:00
Adam Barth
870894fc68 Switch Material Design icons to using the iconfont
Rather than managing all the Material Design icons manually, we now
manage them using an icon font. The icon font contains glyphs for each
icon in an efficient vector format.

This patch updates the FLX tooling to include the MaterialIcons font and
updates the Icon widget to use the font instead of asset images.

Fixes #2313
Fixes #2218
Fixes #2009
Fixes #994
2016-03-02 09:32:02 -08:00
Hans Muller
d8eaac42fb Added menu dividers 2016-03-02 08:45:26 -08:00
Adam Barth
61611d4715 Add tooltips to FloatingActionButtons
Fixes #1875
2016-02-26 13:59:35 -08:00
Adam Barth
2c2fa23886 Remove ThemeData.primarySwatch
In the dark theme, there isn't really a primary swatch, so this API was
a sandtrap. Instead, be explicit about the colors we need for various
widgets in the theme.

Fixes #1277
2016-02-21 20:28:32 -08:00
Devon Carew
04eee82dd2 rename some flutter command references in readmes 2016-02-17 07:34:59 -08:00
Adam Barth
aba27211ef Remove reference to non-existent package 2016-02-13 13:15:19 -08:00
Adam Barth
948ae15ca5 Clean up the standalone examples
Our examples have been growing organically over time. This patch cleans
them up to illustrate specific aspects of Flutter.
2016-02-13 11:00:58 -08:00
Hixie
fd7be69df0 SizeObserver crusade: snap alignment
Remove the SizeObserver you need to use snap alignment in lists by
having the lists provide the size themselves in the callback.

Also, remove snapAlignmentOffset since we couldn't figure out how to
explain it and it's not really needed.
2016-02-12 12:40:44 -08:00
Jason Simmons
279c6149c5 Merge pull request #1747 from jason-simmons/input_field_clear
Change the text/selection value API of the input field
2016-02-11 13:46:13 -08:00
Hixie
8e279f320e Provide a Draggable that starts on drag
This lets it cooperate with other gestures like tap.

The way I implemented this was to refactor the entire Draggable gesture
logic to use a new kind of gesture detector called
MultiDragGestureRecognizer. It works a bit like
MultiTapGestureRecognizer but for drags.

Also some tweaks to the velocity estimator.
2016-02-11 12:54:10 -08:00
Jason Simmons
52c55344d9 Change the text/selection value API of the input field
(see https://github.com/flutter/flutter/issues/1586)
2016-02-11 12:52:15 -08:00
Ian Hickson
abce29f118 Merge pull request #1774 from Hixie/exports
Clean up imports and exports.
2016-02-11 00:12:42 -08:00
Ian Hickson
a94999ba50 Clean up imports and exports.
Each layer is supposed to reexport the parts of the previous layer
that are part of its API.

- In painting.dart, export from dart:ui all the Canvas-related APIs
  that make sense to be used at higher levels, e.g. PaintingStyle.

- Delete painting/shadows.dart. It was dead code.

- In rendering/object.dart, export all of painting.dart.

- In widgets/basic.dart, export all of painting.dart and
  animation.dart. Some classes in animation/ are renamed to make this
  less disruptive and confusing to the namespace.

- Split out Stocks back into an import model rather than a part model,
  so that it's easier to manage its dependencies on a per-file basis.

- Move Ticker to scheduler library.

- Remove as many redundant imports as possible now.

- Some minor nit picking cleanup in various files.
2016-02-11 00:06:23 -08:00
Adam Barth
f4d784dca9 Add an example of creating a custom RenderBox 2016-02-11 00:04:14 -08:00
Hixie
c56d378868 Draggable: childWhenDragging, maxSimultaneousDrags 2016-02-09 14:47:53 -08:00
Adam Barth
657eadcdb5 Make the Mozart demo more like a real window manager
We now have a resizer and close button. Also add some shadows and
launcher buttons.
2016-02-08 21:08:12 -08:00
Adam Barth
256af1433c Actually populate the view host proxy
Now that the engine lets us take the view host handle, we can actually
access the view host from Dart.
2016-02-08 15:14:09 -08:00
Hans Muller
82e4309960 Support a TabLabel icon Widget builder. 2016-02-05 09:43:17 -08:00
Hans Muller
6bc65e0373 Add support for the appbar behavior described in the "Flexible space with image" section of https://www.google.com/design/spec/patterns/scrolling-techniques.html#scrolling-techniques-scrolling. 2016-02-02 16:32:39 -08:00
Kris Giesing
9572b4969f Add support for asset variants and resolution-aware images 2016-01-28 18:11:32 -08:00
Adam Barth
92e0092cae Merge pull request #1412 from abarth/fix_container
examples/widgets/container.dart does not display the buttons
2016-01-27 11:27:46 -08:00
Adam Barth
4aac34019c examples/widgets/container.dart does not display the buttons
Add a missing Material.

Fixes #1402
2016-01-27 10:59:24 -08:00
Hixie
a309cea1d4 Resurrect spinning_mixed.
It had bit-rotted. Also improve our error reporting for missing Material.
2016-01-27 10:07:11 -08:00
Collin Jackson
d48a469f8a Merge pull request #1389 from collinjackson/contentType
Example of setting the content type of a POST request
2016-01-26 13:05:16 -08:00
Collin Jackson
cd95d51c70 Example of setting the content type of a POST request 2016-01-26 12:24:33 -08:00
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
Hans Muller
8218ff683f Change Block children to be a named parameter 2016-01-22 08:04:21 -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
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
Hans Muller
179ca8164e Upgrade progress_indicator demo defend against null color in updateTaskDescription 2016-01-15 08:41:57 -08:00
Hans Muller
cafea7f51f Floating Action Button transitions 2016-01-12 11:42:20 -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
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
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
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
Adam Barth
b1f9138f52 Switch clients of ScrollableList to ScrollableList2
This patch also changed ScrollableList2 to use an Iterable instead of an
List for its children. This change lets clients map their underlying
data lazily. If the clients actually have a concrete list, we skip the
extra copy and grab the child list directly.
2016-01-05 16:21:00 -08:00