1303 Commits

Author SHA1 Message Date
Hans Muller
fcfcfd56d2 Support an empty PageableList 2015-12-10 10:11:54 -08:00
Florian Loitsch
b5aba60147 Minor modifs. 2015-12-09 17:07:51 -08:00
Hans Muller
03e893927f Fix PageableList demo 2015-12-09 16:19:53 -08:00
krisgiesing
37f685b4ad Merge pull request #843 from krisgiesing/activity_service
Use explicit service name for activity service
2015-12-09 15:18:46 -08:00
Adam Barth
ac0aed5ae7 Merge pull request #846 from abarth/text_decoration
Update to the new TextDecoration API
2015-12-09 15:17:14 -08:00
Adam Barth
ab89d2e499 Update to the new TextDecoration API
Now with fewer lists.
2015-12-09 15:11:34 -08:00
Adam Barth
5f29d95018 Let clients of Checkbox, Radio, Slider, and Switch customize the activeColor
We might want to let folks customize the inactive color too, but customizing
the active color is a good place to start.
2015-12-09 14:49:32 -08:00
Hans Muller
c1d42a2fde Revised PageableList 2015-12-09 14:10:14 -08:00
Kris Giesing
70ea4b2cc7 Use explicit service name for activity service 2015-12-09 13:15:54 -08:00
Adam Barth
13f9e91f63 Cleanup the global scope a bit:
- Remove unused FocusChanged typedef.
- Remove unused centerOfAttentionHeroTag.
- Modernize static functions for interacting with Scrollable by moving them
  into the Scrollable class.
2015-12-09 11:12:12 -08:00
Adam Barth
5d6d258533 Update documentation based on comments in previous patch 2015-12-09 09:48:22 -08:00
Adam Barth
8be3a4fd7a Merge pull request #832 from abarth/widget_docs
Add some more dartdoc to widgets
2015-12-09 00:03:33 -08:00
Adam Barth
95fc98108f Improve tolerance for ending scroll animations
We had the units wrong on the tolerances. Previously we multiplied by the
device pixel ratio, which meant we got larger tolerances as we got more
resolution. Also, simplify logic in Newton for applying the tolerances.

Fixes #828
2015-12-08 23:54:43 -08:00
Adam Barth
e55858411f Add some more dartdoc to widgets 2015-12-08 23:42:34 -08:00
Ian Hickson
1a049c14e5 Catch un-normalized BoxConstraints
Add BoxConstraints.isNormalized feature.

Use this feature in asserts in all the intrinsic dimension methods, in
various relevant BoxConstraints methods, and in layout().

Wrap the _DebugSize logic in BoxConstraints.constrain() in an assert
block to avoid a branch in release mode.

Remove the logic in BoxConstraints.isSatisfiedBy() that dealt with
non-normalized values.

Add BoxConstraints.normalize().

Make RenderCustomOneChildLayoutBox.performLayout() only set
parentUsesSize on the child if the constraints aren't tight.
2015-12-08 21:35:39 -08:00
Adam Barth
d1e907f3fa Merge pull request #826 from abarth/gesture_dartdoc
Add some dartdoc for GestureDetector
2015-12-08 19:54:54 -08:00
Adam Barth
25da2cf09c Add some dartdoc for GestureDetector
... just a start.
2015-12-08 19:49:02 -08:00
Eric Seidel
2f4864efbb Merge pull request #825 from eseidelGoogle/locale_test
Add a test to stocks for changing the locale
2015-12-08 16:34:53 -08:00
Eric Seidel
09894ec50b Add a test to stocks for changing the locale
I had to add a setLocale method to WidgetTester and
split the code in FlutterBinding which handled locale
changes to allow me to dispatch a locale change w/o actually
changing what the c++ code reports as the locale.

Also added the test to Travis.

@abarth @jason-simmons
2015-12-08 16:16:24 -08:00
Todd Volkert
d84412d116 Make AssetImage constructor const 2015-12-08 15:13:56 -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