2992 Commits

Author SHA1 Message Date
Collin Jackson
baa1e7ee23 Provide a list of Material design primary and accent color swatches 2016-03-15 13:58:45 -07:00
Adam Barth
dd8413c666 Merge pull request #2695 from abarth/inherit_render_object_widget
Let RenderObjectWidgets use inherited properties
2016-03-15 08:42:17 -07:00
Adam Barth
0084e95a43 Update RichText dartdoc
The old text was misleading because it was written when RichText was an
implementation detail of Text.

Fixes #2624
2016-03-14 20:12:39 -07:00
Adam Barth
3ebd4c58b6 Let RenderObjectWidgets use inherited properties
This prepares us for depending on the LTR/RTL inherited property in
RenderObjectWidgets.
2016-03-14 16:56:56 -07:00
Hans Muller
c111daf6f0 Updated AppBar.copyWith parameter names 2016-03-14 15:50:38 -07:00
Hixie
797e27edd3 Add @override annotations to flutter framework 2016-03-14 14:02:26 -07:00
Adam Barth
9bc6d281fe Merge pull request #2674 from abarth/child_view_error
Improve error handling for ChildView outside MojoShell
2016-03-14 13:41:31 -07:00
Ian Hickson
e77674c612 Merge pull request #2672 from Hixie/ignore-lint
Update .analysis_options to link to blocking bugs
2016-03-14 13:15:14 -07:00
Adam Barth
afacec9a10 Improve error handling for ChildView outside MojoShell
Now we should some placeholder error text in-band in checked mode.

Fixes #2611
2016-03-14 13:11:19 -07:00
Hixie
74b117fe8b Update .analysis_options to link to blocking bugs
Also, some minor cleanup in activity.dart, though much more is
needed (see https://github.com/flutter/flutter/issues/2668).
2016-03-14 12:28:06 -07:00
Adam Barth
89987fc040 [rename fixit] TwoLevelSublist left->leading, center->title 2016-03-14 12:24:58 -07:00
Ian Hickson
9bc4deed1a Merge pull request #2664 from Hixie/less-dynamic
Remove some more 'dynamic's
2016-03-14 11:33:06 -07:00
Hixie
4e6b287881 Remove some more 'dynamic's 2016-03-14 11:11:41 -07:00
Hans Muller
23d7a23e48 Added AppBarBehavior.under, etc 2016-03-14 10:56:59 -07:00
Ian Hickson
d745e20853 Even more types 2016-03-14 09:41:54 -07:00
Adam Barth
d5b2e2a01c [rename fixit] Flex alignments
* justifyContent -> mainAxisAlignment
* alignItems -> crossAxisAlignment
* FlexJustifyContent -> MainAxisAlignment
* FlexAlignItems -> CrossAxisAlignment

Fixes #231
2016-03-12 18:33:47 -08:00
Adam Barth
5e1af2f37e [rename fixit] DismissDirection left -> endToStart, right -> startToEnd
Removes an LTR bias in DismissDirection.

Fixes #2562
2016-03-12 18:33:47 -08:00
Adam Barth
ede5dfce30 [rename fixit] ToolBar -> AppBar
* left -> leading (Removes an LTR bias)
* center -> title (Widget was actually centered)
* right -> actions (Removes an LTR bias, asymmetric with leading)

Fixes #2348
2016-03-12 18:33:47 -08:00
Adam Barth
e48c822ce3 [rename fixit] left -> leading, right -> trailing
The terms "left" and "right" have an LTR bias. Instead, we now use
"leading" and "trailing", for these list and grid decorations so that
we can later rearrange them to match the reading order.

Fixes #2540
Fixes #2548
2016-03-12 17:31:01 -08:00
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