Commit graph

132 commits

Author SHA1 Message Date
Phil Quitslund fffde14f64 Update tools to use analyzer from vended Dart SDK. (#5900)
* Update tools to use `analyzer` from vended Dart SDK.

* updates `flutter_tools` and `flutter_test` to use the SDK-vended `analyzer` package
* tweaks dependency tracking logic to only record the SDK-vended `analyzer` so as not to crash on spurious conflicts (due to transitive dependencies)

* Review fixes.
2016-09-16 11:06:17 -07:00
Yegor 1ba1562293 move CI tests into the main repo (#5758) 2016-09-14 13:22:53 -07:00
Ian Hickson 411db2d587 Tabs occasionally tried to setState after dispose (#5784)
Fixes https://github.com/flutter/flutter/issues/5776
2016-09-09 14:25:34 -07:00
Ian Hickson 1f15e06e45 Handle stateful widgets in layout builders. (#5752)
Previously, if a StatefulWidget was marked dirty, then removed from the
build, then reinserted using the exact same widget under a widget under
a LayoutBuilder, it wouldn't rebuild.

This fixes that.

It also introduces an assert that's supposed to catch SizeObserver-like
behaviour. Rather than make this patch even bigger, I papered over two
pre-existing bugs which this assert uncovered (and fixed the other
problems it found):

   https://github.com/flutter/flutter/issues/5751
   https://github.com/flutter/flutter/issues/5749

We should fix those before 1.0 though.
2016-09-07 14:45:19 -07:00
Devon Carew 22fe5db91a peg dartdoc to a specific version (#5644)
* peg dartdoc to a specific version

* add some documentation

* apply the fix to dev/bots/docs instead
2016-08-29 16:20:18 -07:00
Seth Ladd f28cf64127 ios launcher icons with more padding, optimized (#5470) 2016-08-18 10:16:10 -07:00
Seth Ladd 2326f55281 use transparent android launcher icons (#5442)
* use transparent android launcher icons

* revert stocks icons
2016-08-17 09:05:01 -07:00
Chinmay Garde 21ee4b92f1 Specify the IPHONEOS_DEPLOYMENT_TARGET to 8.0. (#5268)
* Update examples to lower the deployment target on iOS.
2016-08-05 14:56:07 -07:00
Eric Seidel 5a0589c781 Remove stray PRODUCT_BUNDLE_IDENTIFIER (#5242)
* Remove stray PRODUCT_BUNDLE_IDENTIFIER

This was erroneously added and overrides
the bundle for the gallery causing signing
to fail in my setup.

@chinmaygarde

* Remove PRODUCT_BUNDLE_IDENTIFIER from all Runner pbxproj's
2016-08-05 10:00:50 -07:00
Hans Muller 4fe80830ca Use updated appbar background assets (#5248) 2016-08-05 09:02:34 -07:00
Hans Muller 3a7508d702 New gallery identity (#5210) 2016-08-04 11:07:59 -07:00
Ian Hickson 1aeea6263a Fix some misuse of types (#5197)
Thanks to @leafpetersen for catching these.
2016-08-03 13:18:41 -07:00
Seth Ladd b34b453c6c Docs colors logo (#5176)
* update the color and logo for the docs site

* update the color and logo for the docs site

* remove unused file

* removed unused script code

* tweak styles for inherited names
2016-08-01 15:43:10 -07:00
Dragoș Tiselice f3444fcf28 Added BorderRadius. (#5072)
* Added custom radii to RRect.

This is the first commit towads an implementation of
MergeableMaterial. It adds custom radii to RRect.

* Renamed RRect constructors and added BorderRadius.

BorderRadius is a class similar to EdgeInsets that lets you define
all rounded corners of a rounded rectangle easily.
2016-07-29 16:17:57 -07:00
Ian Hickson 51f8fb9979 Add a scrollbar to the license screen. (#5114)
And make Scrollbar work with LazyBlock.

And an about box to the Stocks sample app.
2016-07-29 15:44:12 -07:00
Adam Barth c674b4a803 Rename Image.fromNetwork and Image.fromAssetBundle (#5149)
These now have sorter names to make the callers less verbose.
2016-07-29 13:28:08 -07:00
Adam Barth 79364f0a06 Add Container.align and Container.position (#5128)
These let you add Align widget to the inside or outside of a container.
Several customers have asked for these properties.

Fixes #4950
2016-07-29 10:27:11 -07:00
Adam Barth 534097ffb6 Use named Image constructors (#5129)
Some folks didn't realize these existed and asked us to add them. By
using them in examples, hopefully folks will discover them more easily.
2016-07-29 08:27:28 -07:00
Devon Carew b8d15a1e61 hide some unnecessary headers from the generated docs (#5020) 2016-07-22 22:21:04 -07:00
Dragoș Tiselice 6f0635d6e8 Merge pull request #4953 from flutter/drawer-header-update
Updated DrawerHeader to new spec.
2016-07-21 11:17:18 -07:00
Ian Hickson 69d78325ec Licenses (#4984)
This makes the about page show the licenses of all the Dart packages that a Flutter app uses.

Issues that this does not yet resolve:
- I'm still working on getting the full list of licenses for the sky_engine package.
- Some of the licenses don't print very readably.
- There's no scrollbar on the license page.

I'll provide fixes for the first two in the coming days, but this should unblock anyone who is wanting to see something here, even if it's not quite complete. :-)

----

The patch makes the following changes: 

- The license registry is now asynchronous, since the data comes from disk.
- I moved the default license collector from the foundation package to the services package since it uses the default asset bundle now.
- The FLX builder now includes the LICENSE files of each Dart package mentioned in the `.packages` file.
2016-07-21 09:09:48 -07:00
Dragos Tiselice 65e77142e9 Updated DrawerHeader and added UserAccountDrawer.
Removed old Stack layout and added a simple-to-extend interface for the
new drawer header. Also added a specialized UserAccountsDrawerHeader
consistent with Material Design guidelines.
2016-07-20 16:16:08 -07:00
Seth Ladd 1ac08b2632 Firebase hosting for docs (#4871)
* configs for firebase hosting

* use the implicit FIREBASE_TOKEN

* don't print every command (lowers the chance of printing secret env vars, and for realz only deploy when merging into master
2016-07-12 12:53:47 -07:00
Adam Barth a33fc49659 Remove dangling reference to ViewController (#4841)
We want to use the FlutterViewController in this new project template.

Fixes #4840
2016-07-07 10:45:58 -07:00
Adam Barth 151750baa8 Update the ios projects for examples to HelloServices model (#4822)
We now use a different approach for ios projects where the developer controls
the Xcode project file. This patch removes the old ".generated" approach in
favor of the new approach.
2016-07-06 14:13:21 -07:00
Adam Barth 46da9e8498 Add a simple way of merging coverage data (#4726)
`flutter test` now has a `--merge-coverage` flag that can be used to merge
coverage data from previous runs, enabling faster iteration cycles.
2016-06-23 18:02:55 -07:00
Adam Barth 56039c0e64 Improve test coverage for animation.dart (#4718)
We now have 100% coverage of animation.dart and animation_controller.dart.
Also, add some basic tools for working with lcov files. These tools need much
more polish.
2016-06-23 13:43:42 -07:00
Adam Barth 4be730ac9a Only download cloud SDK if we need it on Travis 2016-06-23 11:56:20 -07:00
Adam Barth bbf31cd3b7 Upload lcov.info to Google Storage (#4712)
Uploading the coverage data file to Google Storage will make it easier
for folks to get current coverage data quickly.
2016-06-23 10:23:13 -07:00
Adam Barth 4f133a6775 Don't run coverage on pull requests (#4710)
It's not reliable enough yet.
2016-06-22 17:52:08 -07:00
Adam Barth ed2c24ba2b Add coveralls support to Travis (#4690)
This patch causes us to upload a coverage report to coveralls.io.
2016-06-22 14:47:41 -07:00
Todd Volkert 0f2c3dc07f Fix multi-line colors on Linux (#4691) 2016-06-22 12:53:07 -07:00
Todd Volkert bc5a66f9e5 Color coding (#4687) 2016-06-22 11:30:21 -07:00
Todd Volkert 84bdb326b4 dev/bots/test.sh += robustness (#4682) 2016-06-22 10:18:24 -07:00
Hans Muller 0e38cba95f Make the limit that defines Row/Column free space configurable (#4646) 2016-06-21 14:29:22 -07:00
Todd Volkert db0efec505 Make bots.sh print failure for when it's run locally (#4654) 2016-06-21 10:50:05 -07:00
Ian Hickson e502e9c8f8 ImageIcon (#4649)
Anywhere that accepted IconData now accepts either an Icon or an
ImageIcon.

Places that used to take an IconData in an `icon` argument, notably
IconButton and DrawerItem, now take a Widget in that slot. You can wrap
the value that used to be passed in in an Icon constructor to get the
same result.

Icon itself now takes the icon as a positional argument, for brevity.

ThemeData now has an iconTheme as well as a primaryIconTheme, the same
way it has had a textTheme and primaryTextTheme for a while.

IconTheme.of() always returns a value now (though that value itself may
have nulls in it). It defaults to the ThemeData.iconTheme.

IconThemeData.fallback() is a new method that returns an icon theme data
structure with all fields filled in.

IconTheme.merge() is a new constructor that takes a context and creates
a widget that mixes in the new values with the inherited values.

Most places that introduced an IconTheme widget now use IconTheme.merge.

IconThemeData.merge and IconThemeData.copyWith act in a way analogous to
the similarly-named members of TextStyle.

ImageIcon is introduced. It acts like Icon but takes an ImageProvider
instead of an IconData.

Also: Fix the analyzer to actually check the stocks app.
2016-06-20 21:04:45 -07:00
Jason Simmons d89823be2a Remove packages/flx and the FLX code signing scheme (#4612) 2016-06-17 12:35:30 -07:00
Ian Hickson 2dfdc840b1 Refactor everything to do with images (#4583)
Overview
========

This patch refactors images to achieve the following goals:

* it allows references to unresolved assets to be passed
  around (previously, almost every layer of the system had to know about
  whether an image came from an asset bundle or the network or
  elsewhere, and had to manually interact with the image cache).

* it allows decorations to use the same API for declaring images as the
  widget tree.

It requires some minor changes to call sites that use images, as
discussed below.

Widgets
-------

Change this:

```dart
      child: new AssetImage(
        name: 'my_asset.png',
        ...
      )
```

...to this:

```dart
      child: new Image(
        image: new AssetImage('my_asset.png'),
        ...
      )
```

Decorations
-----------

Change this:

```dart
      child: new DecoratedBox(
        decoration: new BoxDecoration(
          backgroundImage: new BackgroundImage(
            image: DefaultAssetBundle.of(context).loadImage('my_asset.png'),
            ...
          ),
          ...
        ),
        child: ...
      )
```

...to this:

```dart
      child: new DecoratedBox(
        decoration: new BoxDecoration(
          backgroundImage: new BackgroundImage(
            image: new AssetImage('my_asset.png'),
            ...
          ),
          ...
        ),
        child: ...
      )
```

DETAILED CHANGE LOG
===================

The following APIs have been replaced in this patch:

* The `AssetImage` and `NetworkImage` widgets have been split in two,
  with identically-named `ImageProvider` subclasses providing the
  image-loading logic, and a single `Image` widget providing all the
  widget tree logic.

* `ImageResource` is now `ImageStream`. Rather than configuring it with
  a `Future<ImageInfo>`, you complete it with an `ImageStreamCompleter`.

* `ImageCache.load` and `ImageCache.loadProvider` are replaced by
  `ImageCache.putIfAbsent`.

The following APIs have changed in this patch:

* `ImageCache` works in terms of arbitrary keys and caches
  `ImageStreamCompleter` objects using those keys. With the new model,
  you should never need to interact with the cache directly.

* `Decoration` can now be `const`. The state has moved to the
  `BoxPainter` class. Instead of a list of listeners, there's now just a
  single callback and a `dispose()` method on the painter. The callback
  is passed in to the `createBoxPainter()` method. When invoked, you
  should repaint the painter.

The following new APIs are introduced:

* `AssetBundle.loadStructuredData`.

* `SynchronousFuture`, a variant of `Future` that calls the `then`
  callback synchronously. This enables the asynchronous and
  synchronous (in-the-cache) code paths to look identical yet for the
  latter to avoid returning to the event loop mid-paint.

* `ExactAssetImage`, a variant of `AssetImage` that doesn't do anything clever.

* `ImageConfiguration`, a class that describes parameters that configure
  the `AssetImage` resolver.

The following APIs are entirely removed by this patch:

* `AssetBundle.loadImage` is gone. Use an `AssetImage` instead.

* `AssetVendor` is gone. `AssetImage` handles everything `AssetVendor`
  used to handle.

* `RawImageResource` and `AsyncImage` are gone.

The following code-level changes are performed:

* `Image`, which replaces `AsyncImage`, `NetworkImage`, `AssetImage`,
  and `RawResourceImage`, lives in `image.dart`.

* `DecoratedBox` and `Container` live in their own file now,
  `container.dart` (they reference `image.dart`).

DIRECTIONS FOR FUTURE RESEARCH
==============================

* The `ImageConfiguration` fields are mostly aspirational. Right now
  only `devicePixelRatio` and `bundle` are implemented. `locale` isn't
  even plumbed through, it will require work on the localisation logic.

* We should go through and make `BoxDecoration`, `AssetImage`, and
  `NetworkImage` objects `const` where possible.

* This patch makes supporting animated GIFs much easier.

* This patch makes it possible to create an abstract concept of an
  "Icon" that could be either an image or a font-based glyph (using
  `IconData` or similar). (see
  https://github.com/flutter/flutter/issues/4494)

RELATED ISSUES
==============

Fixes https://github.com/flutter/flutter/issues/4500
Fixes https://github.com/flutter/flutter/issues/4495
Obsoletes https://github.com/flutter/flutter/issues/4496
2016-06-16 09:49:48 -07:00
Ian Hickson f92f71feb9 Lock flutter tool while updating artifacts (#4476)
This prevents multiple simultaneous runs of the analyzer from stomping
over each other (e.g. multiple runs of 'update-packages'). Certain
long-lived commands (like analyze, run, logs) are exempted once they've
done enough work to be safe from most stomping action.

This still doesn't make us entirely safe from craziness, e.g. if you're
half way through an 'update-packages' run and you call 'git pull', who
knows what state you'll end up in. But there's only so much one can do.

Fixes https://github.com/flutter/flutter/issues/2762
2016-06-14 10:16:08 -07:00
Hans Muller ebaf9e29a0 Gallery shrine demo uses image assets (#4544) 2016-06-13 14:48:24 -07:00
Hans Muller 187ff00294 New gallery app bar background (#4539) 2016-06-13 12:41:29 -07:00
Adam Barth 1a3adae101 Use @required for onPressed and onChanged (#4534)
We now use the `@required` annotation to encourage developers to
explicitly set onPressed and onChanged callbacks to null when that would
disable the widget.

Fixes #287
2016-06-12 13:25:06 -07:00
Matt Perry ffde6777fc Pull Flutter gallery assets from Google's git repo. (#4493)
This repo contains the final licensed images.
2016-06-09 16:03:10 -04:00
Matt Perry 3e0e6b9997 Smoothly scale the Pesto logo as the app bar resizes. (#4465)
Also update the assets version to pull in better quality logo images.

BUG=https://github.com/flutter/flutter/issues/4407
2016-06-08 15:49:21 -04:00
Adam Barth 7d9f8d903d Introduce TapDownDetails and TapUpDetails (#4431)
We have these details objects for the same reason we now have drag details
objects: future extensibility.
2016-06-07 16:16:53 -07:00
Todd Volkert 7ac0ce7938 Add API for specifying the system overlay style. (#4422)
Fixes 3544
2016-06-07 14:39:15 -07:00
Hans Muller 0b7e975e2c Updated fitness and weather manual tests, new asset locations (#4351) 2016-06-03 10:38:03 -07:00
Adam Barth 2d4acb8041 Convert drag gestures to use details objects (#4343)
Previously we supplied individual parameters to the various drag and pan
callbacks. However, that approach isn't extensible because each new
parameter is a breaking change to the API.

This patch makes a one-time breaking change to the API to provide a
"details" object that we can extend over time as we need to expose more
information. The first planned extension is adding enough information to
accurately produce an overscroll glow on Android.
2016-06-02 23:45:49 -07:00
Hans Muller dd27a489fa Update gallery demo list (#4335) 2016-06-02 16:12:54 -07:00