1225 Commits

Author SHA1 Message Date
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
Devon Carew
f9855ca72b exclude the i18n files from analysis 2016-03-10 21:42:46 -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
Devon Carew
780e4e6212 move the analysis_options to a file 2016-03-10 13:47:20 -08:00
Matt Perry
0da63e4c2b Add a basic Text Fields demo to Material Gallery app.
BUG=https://github.com/flutter/flutter/issues/1547
2016-03-10 13:56:43 -05: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
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
e4b1eab854 Remove //examples/widgets
Most of the remaining widget examples are actually manual tests. This patch
moves them into //dev/manual_tests. A couple are examples of using services,
which I've moved to //examples/layers/services. The remainder are out-dated and
are removed by this patch.
2016-03-08 16:37:32 -08:00
Hans Muller
73d7378cee Support undo in the leave-behind demo 2016-03-08 15:31:29 -08:00
Hixie
a16f07d945 Drop the argument to SceneBuilder's constructor 2016-03-08 14:17:01 -08:00
Hans Muller
2662ea5283 Added support for List leave-behind items 2016-03-07 14:50:25 -08:00
Adam Barth
bbaff5ea69 Merge pull request #2406 from abarth/rm_draw_looper
Remove the one use of DrawLooper
2016-03-03 20:35:43 -08:00
Adam Barth
245c5ae2b8 Remove the one use of DrawLooper
We're going to remove DrawLooper from the canvas API soon.
2016-03-03 17:32:34 -08:00
Viktor Lidholt
2d76b2f88b Renames Weather demo 2016-03-03 13:17:24 -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
yjbanov
ee184a7821 driver.scroll action; scroll perf test for Stocks 2016-03-02 17:13:49 -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
Hixie
cb5017d17d Convert LinearGradient and RadialGradient to fractional units
Makes it easier to use without a SizeObserver
2016-03-02 09:56:37 -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
Hans Muller
69f9e3b2a9 Added ListItem dividers 2016-03-01 13:07:37 -08:00
Matt Perry
eaee8915e9 Remove unused updater package. 2016-02-29 15:11:20 -05:00
Hans Muller
204130d221 Fixed a typo 2016-02-29 10:12:14 -08:00
Adam Barth
3bbeee7b54 Remove AnimationDirection
This concept is now private to AnimationController. All the clients actually
want the AnimationStatus.
2016-02-26 16:32:42 -08:00
Adam Barth
19b9464e58 Merge pull request #2231 from abarth/fab_tooltips
Add tooltips to FloatingActionButtons
2016-02-26 14:38:36 -08:00
Adam Barth
61611d4715 Add tooltips to FloatingActionButtons
Fixes #1875
2016-02-26 13:59:35 -08:00
Hans Muller
3d377305f4 updated per review feedback 2016-02-26 13:13:46 -08:00
Hans Muller
179d41e68f Add CheckedPopupMenuitem, update the Stocks demo 2016-02-26 11:27:44 -08:00
Hans Muller
f1df2bd7c0 Gallery Menu Demo etc 2016-02-25 16:16:44 -08:00
Eric Seidel
5e7c504530 Remove examples/fitness
We originally wrote examples/fitness to be an app which all
members of the Flutter team could carry on their phones and
use every day.  It served us well for testing of Text input,
Keyboards and writing/reading JSON.  It's never actually become
a real carry app, so lets just let it go for now.

@abarth @collinjackson
2016-02-25 14:32:35 -08:00
Chinmay Garde
f0d1dbc551 Re-run flutter create on examples to fill in icons and other assets 2016-02-25 13:39:34 -08:00
Hixie
0df3730d3e Just-in-time mutations of GestureDetector
This allows us to adjust exactly which gestures we're listening for
during layout, which I'll use to kill a SizeObserver.
2016-02-24 16:18:05 -08:00
Adam Barth
fb4dbf4584 Improve TextSpan
Now we just have one TextSpan class that handles both simple strings, trees of
children, and styling both. This approach simplifies the interface for most
clients.

This patch also removes StyledText, which was weakly typed and tricky to use
correctly. The replacement is RichText, which is strongly typed and uses
TextSpan.
2016-02-24 14:07:10 -08:00
Hans Muller
8dcdec532f Moved the home page padding to inside the Block 2016-02-23 15:49:54 -08:00
Hans Muller
25e22f5648 List Gallery Demo 2016-02-23 15:24:41 -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
Adam Barth
1484add104 Add TestGesture
This helper makes it easier to write correct tests that involve
gestures.

Fixes #1855
2016-02-21 14:32:58 -08:00
Adam Barth
72fcbb7d36 SnackBar should have a single optional action
The example in the spec with multiple actions is an anti-example.

Fixes #1876
2016-02-20 16:54:10 -08:00
Hans Muller
870d9e95f7 Gallery icons demo 2016-02-19 14:40:11 -08:00
Hans Muller
f989d3b855 Tooltip gallery demo 2016-02-19 08:27:16 -08:00
Hans Muller
5070d94243 Added GridTile 2016-02-18 16:08:54 -08:00
Hans Muller
8cfe31f5e8 Added GridTileBar, grid gallery demo 2016-02-18 10:13:36 -08:00
Viktor Lidholt
9576ce4399 Adds dialog for completed exercise in Fitness demo 2016-02-17 10:14:44 -08:00
Devon Carew
04eee82dd2 rename some flutter command references in readmes 2016-02-17 07:34:59 -08:00
Chinmay Garde
8caf7b6289 Add iOS configuration files for all examples and remove GN related files 2016-02-16 16:17:14 -08:00
Chinmay Garde
23bbbcda2a Add iOS specific assets to the Stocks example 2016-02-16 15:58:06 -08:00