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.
diff --git a/dev/manual_tests/.gitignore b/dev/manual_tests/.gitignore
new file mode 100644
index 0000000..52808dd
--- /dev/null
+++ b/dev/manual_tests/.gitignore
@@ -0,0 +1,9 @@
+.atom
+.DS_Store
+.buildlog
+.idea
+.packages
+.pub/
+build/
+packages
+pubspec.lock
diff --git a/examples/widgets/card_collection.dart b/dev/manual_tests/card_collection.dart
similarity index 100%
rename from examples/widgets/card_collection.dart
rename to dev/manual_tests/card_collection.dart
diff --git a/examples/widgets/drag_and_drop.dart b/dev/manual_tests/drag_and_drop.dart
similarity index 100%
rename from examples/widgets/drag_and_drop.dart
rename to dev/manual_tests/drag_and_drop.dart
diff --git a/examples/widgets/mozart.dart b/dev/manual_tests/mozart.dart
similarity index 100%
rename from examples/widgets/mozart.dart
rename to dev/manual_tests/mozart.dart
diff --git a/examples/widgets/overlay_geometry.dart b/dev/manual_tests/overlay_geometry.dart
similarity index 100%
rename from examples/widgets/overlay_geometry.dart
rename to dev/manual_tests/overlay_geometry.dart
diff --git a/examples/widgets/pageable_list.dart b/dev/manual_tests/pageable_list.dart
similarity index 100%
rename from examples/widgets/pageable_list.dart
rename to dev/manual_tests/pageable_list.dart
diff --git a/examples/widgets/pubspec.yaml b/dev/manual_tests/pubspec.yaml
similarity index 68%
rename from examples/widgets/pubspec.yaml
rename to dev/manual_tests/pubspec.yaml
index aefa4bf..b3708d8 100644
--- a/examples/widgets/pubspec.yaml
+++ b/dev/manual_tests/pubspec.yaml
@@ -1,4 +1,4 @@
-name: sky_widgets_examples
+name: flutter_manual_tests
 dependencies:
   flutter:
     path: ../../packages/flutter
diff --git a/examples/widgets/raw_keyboard.dart b/dev/manual_tests/raw_keyboard.dart
similarity index 100%
rename from examples/widgets/raw_keyboard.dart
rename to dev/manual_tests/raw_keyboard.dart
diff --git a/examples/layers/README.md b/examples/layers/README.md
index cedc466..04c1d08 100644
--- a/examples/layers/README.md
+++ b/examples/layers/README.md
@@ -15,6 +15,9 @@
  * [*widgets/*](widgets/) These examples use Flutter's widgets to build more
    elaborate apps using a reactive framework.
 
+ * [*services/*](services/) These examples use services available in Flutter to
+   interact with the host platform.
+
 To run each example, use the `-t` argument to the `flutter` tool:
 
 ```
diff --git a/examples/widgets/piano.dart b/examples/layers/services/media_service.dart
similarity index 100%
rename from examples/widgets/piano.dart
rename to examples/layers/services/media_service.dart
diff --git a/examples/widgets/launch_url.dart b/examples/layers/services/start_activity.dart
similarity index 100%
rename from examples/widgets/launch_url.dart
rename to examples/layers/services/start_activity.dart
diff --git a/examples/widgets/README.md b/examples/widgets/README.md
deleted file mode 100644
index 11addfc..0000000
--- a/examples/widgets/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-Small examples of the Flutter widget framework
-==============================================
-
-To run these, open a terminal in this directory and use the following command:
-
-```bash
-flutter run -t foo.dart
-```
-
-...where `foo.dart` is the file you want to run.
diff --git a/examples/widgets/assets/1.5x/starcircle.png b/examples/widgets/assets/1.5x/starcircle.png
deleted file mode 100644
index 6db147d..0000000
--- a/examples/widgets/assets/1.5x/starcircle.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/assets/2.0x/starcircle.png b/examples/widgets/assets/2.0x/starcircle.png
deleted file mode 100644
index 82d9109..0000000
--- a/examples/widgets/assets/2.0x/starcircle.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/assets/3.0x/starcircle.png b/examples/widgets/assets/3.0x/starcircle.png
deleted file mode 100644
index 71cfad6..0000000
--- a/examples/widgets/assets/3.0x/starcircle.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/assets/4.0x/starcircle.png b/examples/widgets/assets/4.0x/starcircle.png
deleted file mode 100644
index a5730b2..0000000
--- a/examples/widgets/assets/4.0x/starcircle.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/assets/starcircle.png b/examples/widgets/assets/starcircle.png
deleted file mode 100644
index 4aaaddb..0000000
--- a/examples/widgets/assets/starcircle.png
+++ /dev/null
Binary files differ
diff --git a/examples/widgets/flutter.yaml b/examples/widgets/flutter.yaml
deleted file mode 100644
index b393464..0000000
--- a/examples/widgets/flutter.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-name: widgets
-uses-material-design: true
-assets:
-  - assets/starcircle.png
diff --git a/examples/widgets/hero_under.dart b/examples/widgets/hero_under.dart
deleted file mode 100644
index ed5a397..0000000
--- a/examples/widgets/hero_under.dart
+++ /dev/null
@@ -1,138 +0,0 @@
-// Copyright (c) 2015, the Flutter project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:ui' as ui show window;
-
-import 'package:flutter/widgets.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/rendering.dart';
-import 'package:flutter/scheduler.dart';
-import 'package:flutter/services.dart';
-
-void main() {
-  timeDilation = 8.0;
-  runApp(
-    new MaterialApp(
-      title: "Hero Under",
-      routes: {
-        '/': (RouteArguments args) => new HeroDemo()
-      }
-    )
-  );
-}
-
-const String kImageSrc = 'http://uploads0.wikiart.org/images/m-c-escher/crab-canon.jpg!Blog.jpg';
-
-const String kText = """
-Low-crab diets are dietary programs that restrict crustacean consumption, often for the treatment of obesity or diabetes. Foods high in easily digestible crustaceans (e.g., crab, lobster, shrimp) are limited or replaced with foods made from other animals (e.g., poultry, beef, pork) and other crustaceans that are hard to digest (e.g., barnacles), although krill are often allowed. The amount of crab allowed varies with different low-crab diets.
-""";
-
-class HeroImage extends StatelessComponent {
-  HeroImage({ this.size });
-  final Size size;
-  Widget build(BuildContext context) {
-    return new Hero(
-      child: new Container(
-        width: size.width,
-        height: size.height,
-        decoration: new BoxDecoration(
-          backgroundImage: new BackgroundImage(
-            fit: ImageFit.cover,
-            image: imageCache.load(kImageSrc)
-          )
-        )
-      ),
-      tag: HeroImage
-    );
-  }
-}
-
-class HeroDemo extends StatelessComponent {
-  Widget build(BuildContext context)  {
-    return new Scaffold(
-      toolBar: new ToolBar(
-        left: new IconButton(icon: Icons.menu),
-        center: new Text('Diets')
-      ),
-      body: new Center(
-        child: new GestureDetector(
-          onTap: () => Navigator.push(context, new CrabRoute()),
-          child: new Card(
-            child: new Row(
-              children: <Widget>[
-                new HeroImage(
-                  size: const Size(100.0, 100.0)
-                ),
-                new Flexible(
-                  child: new Container(
-                    padding: const EdgeDims.all(10.0),
-                    child: new Text(
-                      "Low Crab Diet",
-                      style: Theme.of(context).text.title
-                    )
-                  )
-                )
-              ]
-            )
-          )
-        )
-      )
-    );
-  }
-}
-
-class CrabRoute extends MaterialPageRoute {
-  CrabRoute() : super(builder: (BuildContext context) => new CrabPage());
-  void insertHeroOverlayEntry(OverlayEntry entry, Object tag, OverlayState overlay) {
-    overlay.insert(entry, above: overlayEntries.first);
-  }
-}
-
-class CrabPage extends StatelessComponent {
-  Widget build(BuildContext context)  {
-    TextStyle titleStyle = Typography.white.display2.copyWith(color: Colors.white);
-    return new Material(
-      color: const Color(0x00000000),
-      child: new Block(
-        children: <Widget>[
-          new Stack(
-            children: <Widget>[
-              new HeroImage(
-                size: new Size(ui.window.size.width, ui.window.size.width)
-              ),
-              new ToolBar(
-                padding: new EdgeDims.only(top: ui.window.padding.top),
-                backgroundColor: const Color(0x00000000),
-                left: new IconButton(
-                  icon: Icons.arrow_back,
-                  onPressed: () => Navigator.pop(context)
-                ),
-                right: <Widget>[
-                    new IconButton(icon: Icons.more_vert)
-                ]
-              ),
-              new Positioned(
-                bottom: 10.0,
-                left: 10.0,
-                child: new Text("Low Crab Diet", style: titleStyle)
-              )
-            ]
-          ),
-          new Material(
-            child: new Container(
-              padding: const EdgeDims.all(10.0),
-              child: new Column(
-                children: <Widget>[
-                  new Text(kText, style: Theme.of(context).text.body1),
-                  new Container(height: 800.0),
-                ],
-                alignItems: FlexAlignItems.start
-              )
-            )
-          )
-        ]
-      )
-    );
-  }
-}
diff --git a/examples/widgets/http_post.dart b/examples/widgets/http_post.dart
deleted file mode 100644
index db50016..0000000
--- a/examples/widgets/http_post.dart
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright 2015, the Flutter project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:flutter/http.dart' as http;
-import 'package:flutter/material.dart';
-
-void main() {
-  runApp(
-    new MaterialApp(
-      title: "HTTP POST Example",
-      routes: {
-        '/': (RouteArguments args) => const PostDemo()
-      }
-    )
-  );
-}
-
-class PostDemo extends StatefulComponent {
-  const PostDemo();
-  PostDemoState createState() => new PostDemoState();
-}
-
-class PostDemoState extends State<PostDemo> {
-
-  String _response = null;
-
-  void initState() {
-    _refresh();
-    super.initState();
-  }
-
-  Future _refresh() async {
-    setState(() {
-      _response = null;
-    });
-    http.Response response = await http.post(
-      "http://httpbin.org/post",
-      body: '{"foo": "bar"}',
-      headers: { "Content-Type": "application/json", "baz": "qux" }
-    );
-    setState(() {
-      _response = response.body;
-    });
-  }
-
-  Widget build(BuildContext context)  {
-    return new Scaffold(
-      toolBar: new ToolBar(
-        center: new Text("HTTP POST example")
-      ),
-      body: new Material(
-        child: new Block(
-          children: <Widget>[
-            new Text(
-              "${_response ?? 'Loading...'}",
-              style: Typography.black.body1
-            )
-          ]
-        )
-      ),
-      floatingActionButton: new FloatingActionButton(
-        tooltip: 'Refresh',
-        child: new Icon(
-          icon: Icons.refresh
-        ),
-        onPressed: _refresh
-      )
-    );
-  }
-}
diff --git a/examples/widgets/indexed_stack.dart b/examples/widgets/indexed_stack.dart
deleted file mode 100644
index 7e782b3..0000000
--- a/examples/widgets/indexed_stack.dart
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'package:flutter/material.dart';
-import 'package:flutter/rendering.dart';
-
-class IndexedStackDemo extends StatefulComponent {
-  IndexedStackDemoState createState() => new IndexedStackDemoState();
-}
-
-class IndexedStackDemoState extends State<IndexedStackDemo> {
-  int _itemCount = 7;
-  int _itemIndex = 0;
-
-  void _handleTap() {
-    setState(() {
-      _itemIndex = (_itemIndex + 1) % _itemCount;
-    });
-  }
-
-  List<PopupMenuItem<int>> _buildMenu() {
-    TextStyle style = const TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold);
-    String pad = '';
-    return new List<PopupMenuItem>.generate(_itemCount, (int i) {
-      pad += '-';
-      return new PopupMenuItem<int>(value: i, child: new Text('$pad Hello World $i $pad', style: style));
-    });
-  }
-
-  Widget build(BuildContext context) {
-    List<PopupMenuItem<int>> items = _buildMenu();
-    IndexedStack indexedStack = new IndexedStack(
-      children: items,
-      index: _itemIndex,
-      alignment: const FractionalOffset(0.5, 0.0)
-    );
-
-    return new Scaffold(
-      toolBar: new ToolBar(center: new Text('IndexedStackDemo Demo')),
-      body: new GestureDetector(
-        onTap: _handleTap,
-        child: new Center(
-          child: new Container(
-            child: indexedStack,
-            padding: const EdgeDims.all(8.0),
-            decoration: new BoxDecoration(border: new Border.all(color: Theme.of(context).accentColor))
-          )
-        )
-      )
-    );
-  }
-}
-
-void main() {
-  runApp(new MaterialApp(
-    title: 'IndexedStackDemo',
-    theme: new ThemeData(
-      brightness: ThemeBrightness.light,
-      primarySwatch: Colors.blue,
-      accentColor: Colors.redAccent[200]
-    ),
-    routes: <String, RouteBuilder>{
-      '/': (RouteArguments args) => new IndexedStackDemo(),
-    }
-  ));
-}
diff --git a/examples/widgets/mimic_demo.dart b/examples/widgets/mimic_demo.dart
deleted file mode 100644
index 3ce73c8..0000000
--- a/examples/widgets/mimic_demo.dart
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'package:flutter/material.dart';
-
-const double _kHeight = 150.0;
-const Duration _kEffectDuration = const Duration(seconds: 1);
-
-class MimicDemo extends StatefulComponent {
-  _MimicDemoState createState() => new _MimicDemoState();
-}
-
-class _MimicDemoState extends State<MimicDemo> {
-  GlobalKey<MimicableState> _orange = new GlobalKey<MimicableState>();
-  GlobalKey _targetContainer = new GlobalKey();
-
-  bool _slotForOrangeOnTop = false;
-  bool _orangeOnTop = false;
-
-  void _handleTap() {
-    if (_slotForOrangeOnTop)
-      return;
-    setState(() {
-      _slotForOrangeOnTop = true;
-    });
-    MimicOverlayEntry entry = _orange.currentState.liftToOverlay();
-    entry.animateTo(targetKey: _targetContainer, duration: _kEffectDuration, curve: Curves.ease).then((_) {
-      setState(() {
-        _orangeOnTop = true;
-      });
-      entry.dispose();
-    });
-  }
-
-  void _reset() {
-    setState(() {
-      _slotForOrangeOnTop = false;
-      _orangeOnTop = false;
-    });
-  }
-
-  Widget _buildOrange() {
-    return new Mimicable(
-      key: _orange,
-      child: new Container(
-        height: _kHeight,
-        decoration: new BoxDecoration(
-          backgroundColor: Colors.deepOrange[500]
-        )
-      )
-    );
-  }
-
-  Widget build(BuildContext context) {
-    List<Widget> children = <Widget>[
-      new Container(
-        height: _kHeight,
-        decoration: new BoxDecoration(
-          backgroundColor: Colors.amber[500]
-        )
-      ),
-      new AnimatedContainer(
-        key: _targetContainer,
-        height: _slotForOrangeOnTop ? _kHeight : 0.0,
-        duration: _kEffectDuration,
-        curve: Curves.ease,
-        child: _orangeOnTop ? _buildOrange() : null
-      ),
-      new Container(
-        height: _kHeight,
-        decoration: new BoxDecoration(
-          backgroundColor: Colors.green[500]
-        )
-      ),
-      new Container(
-        height: _kHeight,
-        decoration: new BoxDecoration(
-          backgroundColor: Colors.blue[500]
-        )
-      ),
-    ];
-
-    if (!_orangeOnTop)
-      children.add(_buildOrange());
-
-    return new GestureDetector(
-      onTap: _handleTap,
-      onLongPress: _reset,
-      child: new Block(children: children)
-    );
-  }
-}
-
-void main() {
-  runApp(new MaterialApp(
-    title: 'Mimic Demo',
-    routes: {
-      '/': (_) => new MimicDemo()
-    }
-  ));
-}
diff --git a/examples/widgets/resolution_awareness.dart b/examples/widgets/resolution_awareness.dart
deleted file mode 100644
index c98117f..0000000
--- a/examples/widgets/resolution_awareness.dart
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) 2016, the Flutter project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:ui' as ui show window;
-
-import 'package:flutter/material.dart';
-import 'package:flutter/services.dart';
-import 'package:flutter/widgets.dart';
-
-class ExampleApp extends StatefulComponent {
-  ExampleState createState() => new ExampleState();
-}
-
-const List<double> _ratios = const <double>[ 1.0, 1.8, 1.3, 2.4, 2.5, 2.6, 3.9 ];
-
-class ExampleState extends State<ExampleApp> {
-
-  int _index = 0;
-  double _ratio = _ratios[0];
-
-  final EdgeDims padding = new EdgeDims.TRBL(
-    ui.window.padding.top,
-    ui.window.padding.right,
-    ui.window.padding.bottom,
-    ui.window.padding.left
-  );
-
-  void _handlePressed() {
-    setState(() {
-      _index++;
-      _index = _index % _ratios.length;
-      _ratio = _ratios[_index];
-    });
-  }
-
-  Widget build(BuildContext context) {
-    const double size = 200.0; // 200 logical pixels
-    TextStyle style = new TextStyle(color: const Color(0xFF0000000));
-    return new MediaQuery(
-      data: new MediaQueryData(
-        size: ui.window.size,
-        devicePixelRatio: _ratio,
-        padding: padding
-      ),
-      child: new AssetVendor(
-        bundle: rootBundle,
-        devicePixelRatio: _ratio,
-        child: new Material(
-          child: new Padding(
-            padding: const EdgeDims.symmetric(vertical: 48.0),
-            child: new Column(
-              children: <Widget>[
-                new AssetImage(
-                  name: 'assets/2.0x/starcircle.png',
-                  height: size,
-                  width: size,
-                  fit: ImageFit.fill
-                ),
-                new Text('Image designed for pixel ratio 2.0', style: style),
-                new AssetImage(
-                  name: 'assets/starcircle.png',
-                  height: size,
-                  width: size,
-                  fit: ImageFit.fill
-                ),
-                new Text(
-                  'Image variant for pixel ratio: ' + _ratio.toString(),
-                  style: style
-                ),
-                new RaisedButton(
-                  child: new Text('Change pixel ratio', style: style),
-                  onPressed: _handlePressed
-                )
-              ],
-              justifyContent: FlexJustifyContent.spaceBetween
-            )
-          )
-        )
-      )
-    );
-  }
-}
-
-main() {
-  runApp(new ExampleApp());
-}
diff --git a/examples/widgets/scrollbar.dart b/examples/widgets/scrollbar.dart
deleted file mode 100644
index 50bdc26..0000000
--- a/examples/widgets/scrollbar.dart
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-import 'package:intl/intl.dart';
-import 'package:flutter/material.dart';
-
-final NumberFormat _dd = new NumberFormat("00", "en_US");
-
-class _Item extends StatelessComponent {
-  _Item(this.index);
-
-  int index;
-
-  Widget build(BuildContext context) {
-    return new Text('Item ${_dd.format(index)}',
-      key: new ValueKey<int>(index),
-      style: Theme.of(context).text.title
-    );
-  }
-}
-
-class ScrollbarApp extends StatefulComponent {
-  ScrollbarAppState createState() => new ScrollbarAppState();
-}
-
-class ScrollbarAppState extends State<ScrollbarApp> {
-  final int _itemCount = 20;
-  final double _itemExtent = 50.0;
-  final ScrollbarPainter _scrollbarPainter = new ScrollbarPainter();
-
-  Widget _buildMenu(BuildContext context) {
-    return new ScrollableList(
-      itemExtent: _itemExtent,
-      scrollableListPainter: _scrollbarPainter,
-      children: new List<Widget>.generate(_itemCount, (int i) => new _Item(i))
-    );
-  }
-
-  Widget build(BuildContext context) {
-    Widget scrollable = new Container(
-      margin: new EdgeDims.symmetric(horizontal: 6.0), // TODO(hansmuller) 6.0 should be based on _kScrollbarThumbWidth
-      child: new Center(
-        widthFactor: 1.0,
-        heightFactor: 1.0,
-        child: new Container(
-          width: 80.0,
-          height: _itemExtent * 5.0,
-          child: _buildMenu(context)
-        )
-      )
-    );
-
-    return new Scaffold(
-      toolBar: new ToolBar(center: new Text('Scrollbar Demo')),
-      body: new Container(
-        padding: new EdgeDims.all(12.0),
-        child: new Center(child: new Card(child: scrollable))
-      )
-    );
-  }
-}
-
-void main() {
-  runApp(new MaterialApp(
-    title: 'ScrollbarApp',
-    theme: new ThemeData(
-      brightness: ThemeBrightness.light,
-      primarySwatch: Colors.blue,
-      accentColor: Colors.redAccent[200]
-    ),
-    routes: <String, RouteBuilder>{
-      '/': (RouteArguments args) => new ScrollbarApp(),
-    }
-  ));
-}
diff --git a/packages/flutter_tools/lib/src/commands/update_packages.dart b/packages/flutter_tools/lib/src/commands/update_packages.dart
index eabc692..d49bc48 100644
--- a/packages/flutter_tools/lib/src/commands/update_packages.dart
+++ b/packages/flutter_tools/lib/src/commands/update_packages.dart
@@ -45,6 +45,7 @@
     bool upgrade = argResults['upgrade'];
     count += await _runPub(new Directory("${ArtifactStore.flutterRoot}/packages"), upgrade: upgrade);
     count += await _runPub(new Directory("${ArtifactStore.flutterRoot}/examples"), upgrade: upgrade);
+    count += await _runPub(new Directory("${ArtifactStore.flutterRoot}/dev"), upgrade: upgrade);
     printStatus('Ran "pub" $count time${count == 1 ? "" : "s"} in ${timer.elapsedMilliseconds} ms');
     return 0;
   }