2173 Commits

Author SHA1 Message Date
Adam Barth
6a2edbbff5 [rename fixit] ItemsSnapAlignment -> PageableListFlingBehavior
Fixes #2448
2016-03-12 17:18:31 -08:00
Adam Barth
9b9ad3db17 [rename fixit] RouteBuilder -> BuildContext
Fixes #2353
2016-03-12 17:18:31 -08:00
Adam Barth
95fc5ae070 [rename fixit] *Component* -> *Widget*
This patch renames StatelessComponent to StatelessWidget and
StatefulComponent to StatefulWidget.

Fixes #2308
2016-03-12 12:34:05 -08:00
Adam Barth
892063ac69 [rename fixit] createFlingScrollSimulation -> createScrollSimulation
Fixes #2233
2016-03-12 12:33:40 -08:00
Adam Barth
726eff4953 [rename fixit] *OneChild* -> *SingleChild*
Fixes #1482
2016-03-12 12:33:39 -08:00
Adam Barth
e71bd77e4f [rename fixit] EdgeDims -> EdgeInsets
Fixes #1382
2016-03-12 12:33:38 -08:00
Adam Barth
7ba1960518 [rename fixit] ThemeData#text -> textTheme
Fixes #1278
2016-03-12 12:32:37 -08:00
Adam Barth
b5923f9282 [rename fixit] Painter -> RenderObjectPainter
Fixes #774
2016-03-12 11:37:39 -08:00
Adam Barth
d78b78c494 [rename fixit] scrollAnchor -> anchor 2016-03-12 11:35:37 -08:00
Adam Barth
e9b8f4450b [rename fixit] scrollDirection -> mainAxis
Fixes #581
2016-03-12 11:35:24 -08:00
Adam Barth
19f615fc2f [rename fixit] MultiChildLayoutDelegate#isChild -> hasChild
Fixes #459
2016-03-12 11:13:10 -08:00
Adam Barth
44c4e930d1 [rename fixit] GestureArena -> GestureArenaManager
Also, change the keys to be explicitly pointer ids.

Fixes #202
2016-03-12 11:13:02 -08:00
Hixie
6795efacab Enable always_specify_types lint
And fix the zillion issues that uncovered.
2016-03-12 00:37:31 -08:00
Ian Hickson
43b0104114 Revert "Merge pull request #2639 from Hixie/always_specify_types"
This reverts commit f41b3411da35929b09009e47cb52474389e42874, reversing
changes made to e33d8d96212f3e337a6660f1eb1118bffc945bf5.

This was a bad check-in due to my mangling uploading a new version of the branch from a different machine.

This reverts https://github.com/flutter/flutter/pull/2639 and will be replaced by https://github.com/flutter/flutter/pull/2640
2016-03-12 00:34:37 -08:00
Hixie
d162d98c79 Enable always_specify_types lint
And fix the zillion issues that uncovered.
2016-03-11 18:27:32 -08:00
Adam Barth
9c08836273 Handle the case of reparenting while updating children
Instead of trying to flush the detached children from the child list, we keep
the set of detached children up to date and query on every read.
2016-03-11 16:34:22 -08:00
Adam Barth
15f6480b0b Merge pull request #2628 from abarth/aspect_ratio
AspectRatio should attempt to fit its height
2016-03-11 15:58:02 -08:00
Adam Barth
6a54e12240 AspectRatio should attempt to fit its height
If there's not enough height for the given aspect ratio, we now try to see if
using the height to infer the width will fit the given constraints. The
algorithm we use is similar to the one we use for RenderImage.

Fixes #2620
2016-03-11 15:25:06 -08:00
Adam Barth
aee2ad5a28 Update engine 2016-03-11 15:03:42 -08:00
Adam Barth
e59b25b21f Add RotatedBox which applies a rotation before layout
Transform applies its transform before painting, but sometimes you want
the widget to layout after its transform has been applied. We can't
handle general tranforms in this way because we can't couple width and
height constriants, but we can handle certain rotations.

Fixes #1214
2016-03-11 12:23:41 -08:00
Adam Barth
4d2b3f0006 Merge pull request #2610 from abarth/update_context
Provide the BuildContext to createRenderObject and updateRenderObject
2016-03-11 09:08:54 -08:00
Adam Barth
0277b075e0 Provide the BuildContext to createRenderObject and updateRenderObject
We'll need this for RTL support because the RTL state will live in the widget
tree. Also, remove the `oldWidget` argument to updateRenderObject because there
aren't any clients for it.
2016-03-11 08:59:37 -08:00
qchong
5ebe61a167 Merge pull request #2574 from qchong/update-api-docs
api docs: Add descriptions for Scaffold, Theme, and ThemeData classes.
2016-03-11 08:52:57 -08:00
Ian Hickson
1b9cd52081 Enable ALL THE LINTS
Well, all the easy ones, anyway.

For some reason `// ignore:` isn't working for me so I've disabled
lints that need that. Also disabled those that require a ton of work
(which I'm doing, but not in this PR, to keep it reviewable).

This adds:
- avoid_init_to_null
- library_names
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_is_not_empty
- sort_constructors_first
- sort_unnamed_constructors_first
- unnecessary_getters_setters
2016-03-10 23:15:31 -08:00
Ian Hickson
7cf2dbdf37 Fix crash when dumping the app if it uses RichText
Specifically:

* Handle null styles in TextSpan without crashing in toString().

* Handle null children in TextSpan child lists without crashing in
  toString().

* Handle entirely empty TextSpans in toString() explicitly.

* Assert that TextSpans don't contain nulls in various places. This is
  done more often than one might think necessary, because it turns out
  that TextSpan takes a (mutable) List for one of its arguments, so
  who knows what it will contain at any given time. By asserting all
  over the place, hopefully we'll catch it near the change if they do
  change it.

* Add a RichText example to Stocks to exercise RichText and TextSpans.

See also: https://github.com/flutter/flutter/issues/2514, https://github.com/flutter/flutter/issues/2519
2016-03-10 20:48:50 -08:00
Adam Barth
0327141c37 Prepare to make RenderObjectElement buildable
This patch prepares us to pass a BuildContext to RenderObjectWidgets, which
will make it possible to rebuild RenderObjectElements:

 * Delay creation of the render object until mount(). That will let us pass
   `this` to createRenderObject and have the inherited elements be initialized.

 * Cleanup widgets that take builder closures to prepare for their
   RenderObjectElement to be rebuilt more often.

 * Add a test for the interaction between inherited widgets and
   MixedViewport.

Related to #2598
2016-03-10 20:18:37 -08:00
Quddus Chong
2e4fb21aca api docs: Add descriptions for Scafold, Theme, and ThemeData classes. 2016-03-10 17:55:16 -08:00
Adam Barth
7f5d6a9913 Use a member function instead of an anonymous closure
It's slightly more efficient.
2016-03-10 16:31:43 -08:00
Adam Barth
10591730f5 Use the .. pattern more in updateRenderObject 2016-03-10 15:34:53 -08:00
Hans Muller
9536c418fc Scaffold saves and restores scrollable state, etc 2016-03-10 09:19:04 -08:00
Hixie
c7339de6bc Enable always_declare_return_types lint
And fix a zillion omissions this uncovered.
2016-03-09 17:57:39 -08:00
Hixie
8950d3ccc4 Make flutter analyze useful for package conflicts
Also, resolve our package conflict, since reflectable has been fixed.
2016-03-09 17:41:05 -08:00
Hixie
5810cd80bd Avoid 'as' keyword
It has performance implications in release mode.

We'll enable the lint once https://github.com/dart-lang/linter/issues/195 is fixed.
2016-03-09 15:00:55 -08:00
Adam Barth
778c3a05b1 Merge pull request #2530 from abarth/to_string
Improve InputValue#toString
2016-03-09 13:56:53 -08:00
Adam Barth
0d7b0f9ec1 Test harness should check for running Timers and AnimationControllers
After running a widget test, we now clear out the widget tree and check that we
didn't leak any timers or animations.

Also, fix several bugs that this addtional check revealed.

Fixes #2481
2016-03-09 13:37:24 -08:00
Adam Barth
fecba009ee Improve InputValue#toString 2016-03-09 12:42:52 -08:00
Hans Muller
335354d958 Merge pull request #2523 from HansMuller/lower_bound
Use lowerBound() from package:collection/collection.dart
2016-03-09 09:38:33 -08:00
Hans Muller
149f788c9e Use lowerBound() from package:collection/collection.dart 2016-03-09 09:22:51 -08:00
Hans Muller
e0df9eca5a Added SizeTransition 2016-03-09 08:18:41 -08:00
Hans Muller
efa36de7f0 Merge pull request #2482 from HansMuller/dismiss_action
Support undo in the leave-behind demo
2016-03-08 15:44:50 -08:00
Adam Barth
1c5a9692d8 Merge pull request #2508 from abarth/reparent_multichild
Support reparenting state from MultiChildRenderObjectElement
2016-03-08 15:42:17 -08:00
Hans Muller
73d7378cee Support undo in the leave-behind demo 2016-03-08 15:31:29 -08:00
Adam Barth
e8483fb366 Support reparenting state from MultiChildRenderObjectElement
Fixes #2085
2016-03-08 15:21:20 -08:00
Ian Hickson
33ab0ee673 Merge pull request #2504 from Hixie/scene-builder-arg
Drop the argument to SceneBuilder's constructor
2016-03-08 15:05:23 -08:00
Matt Perry
643ab478ff CheckedPopupMenuItem now fades its icon when changed.
BUG=https://github.com/flutter/flutter/issues/2274
2016-03-08 17:50:17 -05:00
Hixie
a16f07d945 Drop the argument to SceneBuilder's constructor 2016-03-08 14:17:01 -08:00
Adam Barth
22dc5590c9 Merge pull request #2488 from abarth/custom_sized_by_parent
RenderCustomMultiChildLayoutBox shouldn't be sizedByParent
2016-03-08 12:49:11 -08:00
Adam Barth
cdc2aefc69 ImageFit.cover doesn't respect alignment
We need to apply the alignment to the source rect because the ouput rect fills
the destination rect.

Fixes #1514
2016-03-08 12:39:46 -08:00
Adam Barth
3fb0df878d RenderCustomMultiChildLayoutBox shouldn't be sizedByParent
The getSize function from MultiChildLayoutDelegate might depend on information
other than the incomming constraints.

Fixes #2077
2016-03-08 12:10:00 -08:00
Adam Barth
501b948e05 Remove bogus intrinsic size assert
This patch tweaks the definition of max intrinsic size to give implementations
more wiggle room to compute there intrinsic sizes more efficiently.
Specifically, implementations can now ignore the incomming constraint in the
cross axis if they prefer.

This patch removes an assert that is no longer valid w.r.t. the new definition
of intrinsic sizing.

Fixes #2099
2016-03-08 11:14:00 -08:00