1284 Commits

Author SHA1 Message Date
Todd Volkert
1e3a85fe73 Make AssetImage constructor const 2015-12-08 14:25:52 -08:00
Adam Barth
c130dfff5f Merge pull request #812 from abarth/check_material
Widgets that depend on Material should assert that
2015-12-08 13:50:02 -08:00
Adam Barth
c0f068ce5a Merge pull request #814 from abarth/rm_event_recorder
Remove unused EventRecorder
2015-12-08 13:49:53 -08:00
Collin Jackson
56818d186d Merge pull request #801 from collinjackson/fix_dynamic_hero
Fix hero transition when using dynamic routes
2015-12-08 13:48:45 -08:00
Adam Barth
8dc607a976 Widgets that depend on Material should assert that
After this patch, if you try to use a widget that depends on being enclosed in
a material, you now get an assert and a debugPrint if you're not inside a
material.

Fixes #243
2015-12-08 13:38:19 -08:00
Adam Barth
a45b85c345 Remove unused EventRecorder 2015-12-08 13:34:07 -08:00
Collin Jackson
d05c564cef Fix hero transition when using dynamic routes 2015-12-08 13:08:16 -08:00
Hixie
7514ce12a2 Clean up pointer handling.
Previously we tried to work around some possible badness from the engine
side, but now we are more assertive about the engine needing to do the
right thing.
2015-12-08 12:45:19 -08:00
Adam Barth
5eae4d5a44 Merge pull request #805 from abarth/double_pop
Double-tapping modal barrier pops twice
2015-12-08 09:40:23 -08:00
Adam Barth
e857bc6f11 Merge pull request #806 from abarth/use_route_state
_ModalScope has local copies of route state
2015-12-07 22:42:40 -08:00
Adam Barth
f202e7ab17 _ModalScope has local copies of route state
Now we just use the state from the Route.

Fixes #744
2015-12-07 21:50:06 -08:00
Ian Hickson
2afa87dfcd Make BoxDecoration replaceable.
Factor out a reusable interface called Decoration from BoxDecoration.

Make all the consumers of BoxDecoration and the erstwhile BoxPainter
into consumers of Decoration.

Make a BoxPainter be something you get from a Decoration, rather than
something to which you pass a BoxDecoration.

Rename Shape to BoxShape now that it's documented specifically as
applying to boxes.

Move EdgeDims to its own file.

Move FractionalOffset up so that it's with the other helper classes in
its file rather than alone at the end.

Minor change to RenderClipOval's hit testing to avoid taking an
unnecessary square root.

Rename BoxDecorationPosition to DecorationPosition since
RenderDecoratedBox now takes any Decoration.

Implement hit testing for rounded rects.

Rename AnimatedBoxDecorationValue to AnimatedDecorationValue, and make
it support lerping across any Decoration (by deferring to the objects
involved).
2015-12-07 19:24:25 -08:00
Jason Simmons
0fe72b17f3 Merge pull request #788 from jason-simmons/platform_locale
Add a LocaleQuery widget that can be used to fetch locale-specific data
2015-12-07 17:44:20 -08:00
Jason Simmons
9693cd5537 Add a LocaleQuery widget that can be used to fetch locale-specific data
Users of MaterialApp can provide an onLocaleChanged handler that will be
called to asynchronously fetch locale-specific data.  MaterialApp will
then instantiate a LocaleQuery that supplies the locale data to its
descendants.
2015-12-07 17:38:50 -08:00
Adam Barth
c05871a7b4 Double-tapping modal barrier pops twice
Now we ignore the pointer after we start popping the route.

Fixes #686
2015-12-07 16:54:25 -08:00
Adam Barth
8dd8c203e2 Merge pull request #803 from abarth/dropdown
Material gallery crashes when you press the drop-down button
2015-12-07 16:20:11 -08:00
Adam Barth
4982c553b8 Material gallery crashes when you press the drop-down button
Now use use the route's getPosition function to position the drop-down menu.
Also, fix a number of other related bugs that blocked the dropdown button from
working correctly. The dropdown menu still has the following issues:

1) In the exit animation, the background of the menu disappears too quickly
   because of incorrect paint bounds computations in the layer tree.
2) The drop down menu isn't positioned correctly after the device rotates.
   We'll need to address this issue in a separate patch.

Fixes #630
2015-12-07 16:11:28 -08:00
Hixie
18d5c5e7ae didChangeNext()
Replace didPushNext() and didReplaceNext() with didChangeNext(), and
call it in more cases, so that a route can easily track the next route.

Use this to make TransitionRoute properly track its next route so that
you can do next-route-driven animations that work even with removes,
replaces, and other crazy manipulations of the navigator stack.
2015-12-07 15:39:56 -08:00
Hixie
18beb4b45b Fix pointer up/move/cancel listeners
Fallout from the pointer refactor.
2015-12-07 15:20:21 -08:00
Ian Hickson
5f5245dd5e Merge pull request #798 from Hixie/popUntil
Navigator.popUntil
2015-12-07 15:02:36 -08:00
Ian Hickson
2305d019ac Merge pull request #795 from Hixie/overlayDebuggingFix
Make debugIsVisible work.
2015-12-07 14:58:25 -08:00
Hixie
cf3077ea98 Navigator.popUntil
This was already supported in the underlying classes but somehow not
exposed by Navigator itself.
2015-12-07 14:54:03 -08:00
Ian Hickson
6a7f50c493 Merge pull request #794 from Hixie/AlwaysDismissedPerformance
AlwaysDismissedPerformance
2015-12-07 14:50:53 -08:00
Hixie
8b9ffca8d1 Make debugIsVisible work.
Turns out it was always returning true (visible).
2015-12-07 14:46:18 -08:00
Hixie
e92d393467 AlwaysDismissedPerformance
The same as AlwaysCompletePerformance but the exact opposite.
2015-12-07 14:44:53 -08:00
Hixie
7138a37293 Debugging aids for overlays, performances 2015-12-07 14:42:42 -08:00
Adam Barth
ba936c0f0b The intial route shouldn't run its entrance animation
Instead, it should enter the world fully formed.
2015-12-07 11:11:03 -08:00
Adam Barth
73e62d386b Merge pull request #779 from abarth/basic_docs
Add some dartdoc to basic widgets
2015-12-07 10:57:00 -08:00
Hixie
7243c5629c Got the check the wrong way in the last patch.
TBR @abarth
2015-12-07 10:44:19 -08:00
Adam Barth
069fc6dd8b Add some dartdoc to basic widgets
These docs are largely duplicated from the cooresponding rendering classes. I'm
not sure how we can avoid repeating ourselves.
2015-12-07 10:27:53 -08:00
Hixie
aabae3af82 Ignore hover events. 2015-12-07 10:15:11 -08:00
Adam Barth
1d8bea0ab2 Merge pull request #783 from abarth/mimic_mark_needs_build
Expose markNeedsBuild on MimicOverlayEntry
2015-12-07 10:01:46 -08:00
Adam Barth
23776e7e7c Expose markNeedsBuild on MimicOverlayEntry
We expose this function on OverlayEntry to let you drive animations in the
overlay. The same use case applies to MimicOverlayEntry.
2015-12-07 09:50:50 -08:00
Hixie
f3a65d0626 Export the new pointer event classes. 2015-12-07 09:12:28 -08:00
Adam Barth
2f3baf14b3 Parent data fixes
Add some missing functionality to ParentData subclasses.

Fixes #474
2015-12-06 21:34:41 -08:00
Adam Barth
e46f480733 Repeated background images should be clipped to the container
Fixes #766
2015-12-05 10:50:23 -08:00
Adam Barth
3419b3e493 Merge pull request #764 from abarth/material_page_completer
Add a completer to MaterialPageRoute
2015-12-05 10:17:53 -08:00
Adam Barth
616c6d7918 LayoutId should default to using its id as its key
This default seems likely to be benefitial because typically the LayoutIds
coorespond to semantic slots in a bespoke layout.
2015-12-05 09:06:36 -08:00
Adam Barth
5ea4990c51 Add a completer to MaterialPageRoute
Fixes #608
2015-12-05 01:43:05 -08:00
Adam Barth
e7c05e5781 Popup menu splash doesn't go to edge
Now the splash goes to the edge. Also, fold popup_menu_item.dart into
popup_menu.dart for simplicity.

Fixes #266
2015-12-05 01:21:07 -08:00
Adam Barth
503218cd40 Merge pull request #762 from abarth/image_repeat
Implement ImageRepeat
2015-12-05 01:12:43 -08:00
Adam Barth
9c00bc5378 Implement ImageRepeat
Fixes #158
2015-12-05 00:42:15 -08:00
Ian Hickson
2965dcb61f Cleanup for the Pointer changes. 2015-12-05 00:31:27 -08:00
Ian Hickson
f162555648 PointerInput refactor
Instead of PointerInputEvent having a "type" field, we now have a
different class for each pointer type.

This has ripple effects throughout the system.

I also did code cleanup in affected files while I was there.
2015-12-04 22:42:38 -08:00
Adam Barth
bc1b47e917 Merge pull request #755 from abarth/rm_painting_canvas
Remove PaintingCanvas
2015-12-04 21:23:49 -08:00
Adam Barth
abf0359569 Remove PaintingCanvas
We can just use Canvas now.  The two are the same thing.
2015-12-04 20:26:08 -08:00
Adam Barth
40bc9e65da Remove outdated radial_reaction.dart
We now draw radial reactions using Material.
2015-12-04 20:20:29 -08:00
Ian Hickson
b6cf053e89 Merge pull request #752 from Hixie/yak3-remove-timing
Replace AnimationTiming with CurvedPerformance
2015-12-04 18:09:58 -08:00
Hixie
379b6a50f2 Replace AnimationTiming with CurvedPerformance
Also, replace places that use the term "create performance" with
"create performance controller".
2015-12-04 17:42:09 -08:00
Hixie
21ec20e947 MeanPerformance 2015-12-04 16:57:29 -08:00