Rename App to MaterialApp MaterialApp assumes that you're using material design. Also move radial reaction and fix imports for stats box.
diff --git a/examples/address_book/lib/main.dart b/examples/address_book/lib/main.dart index fb10ecc..dee2b76 100644 --- a/examples/address_book/lib/main.dart +++ b/examples/address_book/lib/main.dart
@@ -94,7 +94,7 @@ ); void main() { - runApp(new App( + runApp(new MaterialApp( title: 'Address Book', theme: theme, routes: <String, RouteBuilder>{
diff --git a/examples/demo_launcher/lib/main.dart b/examples/demo_launcher/lib/main.dart index dd4bf62..a95c24e 100644 --- a/examples/demo_launcher/lib/main.dart +++ b/examples/demo_launcher/lib/main.dart
@@ -201,7 +201,7 @@ } void main() { - runApp(new App( + runApp(new MaterialApp( title: 'Flutter Demos', theme: _theme, routes: {
diff --git a/examples/fitness/lib/main.dart b/examples/fitness/lib/main.dart index c747be6..453648b 100644 --- a/examples/fitness/lib/main.dart +++ b/examples/fitness/lib/main.dart
@@ -125,7 +125,7 @@ } Widget build(BuildContext) { - return new App( + return new MaterialApp( theme: new ThemeData( brightness: ThemeBrightness.light, primarySwatch: Colors.indigo,
diff --git a/examples/game/example_effect_line.dart b/examples/game/example_effect_line.dart index 05323d0..6d05848 100644 --- a/examples/game/example_effect_line.dart +++ b/examples/game/example_effect_line.dart
@@ -53,7 +53,7 @@ ]; Widget build(BuildContext context) { - return new App( + return new MaterialApp( title: 'EffectLine Demo', theme: _theme, routes: {
diff --git a/examples/game/lib/main.dart b/examples/game/lib/main.dart index 9150ab9..098f3eb 100644 --- a/examples/game/lib/main.dart +++ b/examples/game/lib/main.dart
@@ -81,7 +81,7 @@ int _lastScore = 0; Widget build(BuildContext context) { - return new App( + return new MaterialApp( title: 'Asteroids', theme: _theme, routes: {
diff --git a/examples/game/test_bed.dart b/examples/game/test_bed.dart index 653a566..b2dc7fb 100644 --- a/examples/game/test_bed.dart +++ b/examples/game/test_bed.dart
@@ -32,7 +32,7 @@ runApp(_app); } -class TestBedApp extends App { +class TestBedApp extends MaterialApp { Widget build() { ThemeData theme = new ThemeData(
diff --git a/examples/game/test_drawatlas.dart b/examples/game/test_drawatlas.dart index dba1748..edf568e 100644 --- a/examples/game/test_drawatlas.dart +++ b/examples/game/test_drawatlas.dart
@@ -32,7 +32,7 @@ String json = await _bundle.loadString('assets/sprites.json'); _spriteSheet = new SpriteSheet(_images['assets/sprites.png'], json); - runApp(new App( + runApp(new MaterialApp( title: 'Test drawAtlas', theme: _theme, routes: {
diff --git a/examples/game/test_performance.dart b/examples/game/test_performance.dart index 5ceab23..44d363c 100644 --- a/examples/game/test_performance.dart +++ b/examples/game/test_performance.dart
@@ -33,7 +33,7 @@ String json = await _bundle.loadString('assets/sprites.json'); _spriteSheet = new SpriteSheet(_images['assets/sprites.png'], json); - runApp(new App( + runApp(new MaterialApp( title: 'Test Sprite Performance', theme: _theme, routes: {
diff --git a/examples/game/test_physics.dart b/examples/game/test_physics.dart index 137a325..4c2ecc1 100644 --- a/examples/game/test_physics.dart +++ b/examples/game/test_physics.dart
@@ -27,7 +27,7 @@ String json = await _bundle.loadString('assets/sprites.json'); _spriteSheet = new SpriteSheet(_images['assets/sprites.png'], json); - runApp(new App( + runApp(new MaterialApp( title: 'Test Physics', theme: new ThemeData( brightness: ThemeBrightness.light,
diff --git a/examples/stocks/lib/main.dart b/examples/stocks/lib/main.dart index 1a46790..f791c55 100644 --- a/examples/stocks/lib/main.dart +++ b/examples/stocks/lib/main.dart
@@ -87,7 +87,7 @@ } Widget build(BuildContext context) { - return new App( + return new MaterialApp( title: 'Stocks', theme: theme, routes: <String, RouteBuilder>{
diff --git a/examples/widgets/card_collection.dart b/examples/widgets/card_collection.dart index 7896c68..0293a73 100644 --- a/examples/widgets/card_collection.dart +++ b/examples/widgets/card_collection.dart
@@ -372,7 +372,7 @@ } void main() { - runApp(new App( + runApp(new MaterialApp( title: 'Cards', routes: { '/': (RouteArguments args) => new CardCollection(navigator: args.navigator),
diff --git a/examples/widgets/drag_and_drop.dart b/examples/widgets/drag_and_drop.dart index a7c5ff6..7de9a6b 100644 --- a/examples/widgets/drag_and_drop.dart +++ b/examples/widgets/drag_and_drop.dart
@@ -129,7 +129,7 @@ } void main() { - runApp(new App( + runApp(new MaterialApp( title: 'Drag and Drop Flutter Demo', routes: { '/': (RouteArguments args) => new DragAndDropApp(navigator: args.navigator)
diff --git a/examples/widgets/ensure_visible.dart b/examples/widgets/ensure_visible.dart index d59e0d6..fe570fd 100644 --- a/examples/widgets/ensure_visible.dart +++ b/examples/widgets/ensure_visible.dart
@@ -13,7 +13,7 @@ Key get key => new ObjectKey(this); } -class EnsureVisibleApp extends App { +class EnsureVisibleApp extends MaterialApp { static const TextStyle cardLabelStyle = const TextStyle(color: Colors.white, fontSize: 18.0, fontWeight: bold);
diff --git a/examples/widgets/indexed_stack.dart b/examples/widgets/indexed_stack.dart index e7a5e49..5f23624 100644 --- a/examples/widgets/indexed_stack.dart +++ b/examples/widgets/indexed_stack.dart
@@ -56,7 +56,7 @@ } void main() { - runApp(new App( + runApp(new MaterialApp( title: 'IndexedStackDemo', theme: new ThemeData( brightness: ThemeBrightness.light,
diff --git a/examples/widgets/navigation.dart b/examples/widgets/navigation.dart index 1e76049..9624c20 100644 --- a/examples/widgets/navigation.dart +++ b/examples/widgets/navigation.dart
@@ -57,7 +57,7 @@ ); void main() { - runApp(new App( + runApp(new MaterialApp( title: 'Navigation Example', theme: theme, routes: routes
diff --git a/examples/widgets/overlay_geometry.dart b/examples/widgets/overlay_geometry.dart index 34be772..bc55caf 100644 --- a/examples/widgets/overlay_geometry.dart +++ b/examples/widgets/overlay_geometry.dart
@@ -156,7 +156,7 @@ } void main() { - runApp(new App( + runApp(new MaterialApp( theme: new ThemeData( brightness: ThemeBrightness.light, primarySwatch: Colors.blue,
diff --git a/examples/widgets/pageable_list.dart b/examples/widgets/pageable_list.dart index f51083e..05d216d 100644 --- a/examples/widgets/pageable_list.dart +++ b/examples/widgets/pageable_list.dart
@@ -156,7 +156,7 @@ } void main() { - runApp(new App( + runApp(new MaterialApp( title: 'PageableList', theme: new ThemeData( brightness: ThemeBrightness.light,
diff --git a/examples/widgets/sector.dart b/examples/widgets/sector.dart index c87d87c..d6253c2 100644 --- a/examples/widgets/sector.dart +++ b/examples/widgets/sector.dart
@@ -16,7 +16,7 @@ ); } -class SectorApp extends App { +class SectorApp extends MaterialApp { RenderBoxToRenderSectorAdapter sectors = initCircle(); math.Random rand = new math.Random(1);
diff --git a/packages/flutter/lib/material.dart b/packages/flutter/lib/material.dart index 69cabb7..e2e50c7 100644 --- a/packages/flutter/lib/material.dart +++ b/packages/flutter/lib/material.dart
@@ -7,7 +7,6 @@ /// See https://www.google.com/design/spec/material-design/introduction.html library material; -export 'src/material/app.dart'; export 'src/material/card.dart'; export 'src/material/checkbox.dart'; export 'src/material/colors.dart'; @@ -25,10 +24,11 @@ export 'src/material/icon.dart'; export 'src/material/ink_well.dart'; export 'src/material/input.dart'; -export 'src/material/material_button.dart'; export 'src/material/material.dart'; -export 'src/material/popup_menu.dart'; +export 'src/material/material_app.dart'; +export 'src/material/material_button.dart'; export 'src/material/popup_menu_item.dart'; +export 'src/material/popup_menu.dart'; export 'src/material/progress_indicator.dart'; export 'src/material/radio.dart'; export 'src/material/raised_button.dart'; @@ -37,10 +37,11 @@ export 'src/material/snack_bar.dart'; export 'src/material/switch.dart'; export 'src/material/tabs.dart'; -export 'src/material/theme.dart'; export 'src/material/theme_data.dart'; +export 'src/material/theme.dart'; export 'src/material/title.dart'; export 'src/material/tool_bar.dart'; export 'src/material/typography.dart'; +export 'src/material/radial_reaction.dart'; export 'widgets.dart';
diff --git a/packages/flutter/lib/painting.dart b/packages/flutter/lib/painting.dart index a8f2051..e23302c 100644 --- a/packages/flutter/lib/painting.dart +++ b/packages/flutter/lib/painting.dart
@@ -13,7 +13,6 @@ library painting; export 'src/painting/box_painter.dart'; -export 'src/painting/radial_reaction.dart'; export 'src/painting/shadows.dart'; export 'src/painting/text_painter.dart'; export 'src/painting/text_style.dart';
diff --git a/packages/flutter/lib/rendering.dart b/packages/flutter/lib/rendering.dart index d37ea3c..4a9564b 100644 --- a/packages/flutter/lib/rendering.dart +++ b/packages/flutter/lib/rendering.dart
@@ -23,6 +23,7 @@ export 'src/rendering/shifted_box.dart'; export 'src/rendering/binding.dart'; export 'src/rendering/stack.dart'; +export 'src/rendering/statistics_box.dart'; export 'src/rendering/toggleable.dart'; export 'src/rendering/view.dart'; export 'src/rendering/viewport.dart';
diff --git a/packages/flutter/lib/src/material/app.dart b/packages/flutter/lib/src/material/material_app.dart similarity index 79% rename from packages/flutter/lib/src/material/app.dart rename to packages/flutter/lib/src/material/material_app.dart index e73eab1..8076d94 100644 --- a/packages/flutter/lib/src/material/app.dart +++ b/packages/flutter/lib/src/material/material_app.dart
@@ -23,21 +23,15 @@ decorationStyle: TextDecorationStyle.double ); -class App extends StatefulComponent { - App({ +class MaterialApp extends StatefulComponent { + MaterialApp({ Key key, this.title, this.theme, this.routes, this.onGenerateRoute }) : super(key: key) { - assert(() { - 'The "routes" argument to App() is required.'; - 'This might be a sign that you have not upgraded to our new Widgets framework.'; - 'For more details see: https://groups.google.com/forum/#!topic/flutter-dev/hcX3OvLws9c'; - '...or look at our examples: https://github.com/flutter/engine/tree/master/examples'; - return routes != null; - }); + assert(routes != null); } final String title; @@ -45,10 +39,10 @@ final Map<String, RouteBuilder> routes; final RouteGenerator onGenerateRoute; - _AppState createState() => new _AppState(); + _MaterialAppState createState() => new _MaterialAppState(); } -class _AppState extends State<App> { +class _MaterialAppState extends State<MaterialApp> { GlobalObjectKey _navigator;
diff --git a/packages/flutter/lib/src/painting/radial_reaction.dart b/packages/flutter/lib/src/material/radial_reaction.dart similarity index 100% rename from packages/flutter/lib/src/painting/radial_reaction.dart rename to packages/flutter/lib/src/material/radial_reaction.dart
diff --git a/packages/flutter/lib/src/material/switch.dart b/packages/flutter/lib/src/material/switch.dart index 959d940..c221028 100644 --- a/packages/flutter/lib/src/material/switch.dart +++ b/packages/flutter/lib/src/material/switch.dart
@@ -5,11 +5,12 @@ import 'dart:async'; import 'dart:sky' as sky; -import 'package:sky/material.dart'; import 'package:sky/painting.dart'; import 'package:sky/rendering.dart'; import 'package:sky/widgets.dart'; +import 'radial_reaction.dart'; +import 'shadows.dart'; import 'theme.dart'; export 'package:sky/rendering.dart' show ValueChanged;
diff --git a/packages/flutter/lib/src/widgets/statistics_overlay.dart b/packages/flutter/lib/src/widgets/statistics_overlay.dart index a4c5eb6..80fa779 100644 --- a/packages/flutter/lib/src/widgets/statistics_overlay.dart +++ b/packages/flutter/lib/src/widgets/statistics_overlay.dart
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'framework.dart'; +import 'package:sky/rendering.dart'; -import 'package:sky/src/rendering/statistics_box.dart'; +import 'framework.dart'; /// The options that control whether the statistics overlay displays certain /// aspects of the compositor
diff --git a/packages/unit/test/widget/drawer_test.dart b/packages/unit/test/widget/drawer_test.dart index 36389c8..2e976af 100644 --- a/packages/unit/test/widget/drawer_test.dart +++ b/packages/unit/test/widget/drawer_test.dart
@@ -10,7 +10,7 @@ testWidgets((WidgetTester tester) { NavigatorState navigator; tester.pumpWidget( - new App( + new MaterialApp( routes: { '/': (RouteArguments args) { navigator = args.navigator; @@ -39,7 +39,7 @@ NavigatorState navigator; tester.pumpWidget(new Container()); // throw away the old App and its Navigator tester.pumpWidget( - new App( + new MaterialApp( routes: { '/': (RouteArguments args) { navigator = args.navigator;
diff --git a/packages/unit/test/widget/snack_bar_test.dart b/packages/unit/test/widget/snack_bar_test.dart index eb056b3..4ddfd84 100644 --- a/packages/unit/test/widget/snack_bar_test.dart +++ b/packages/unit/test/widget/snack_bar_test.dart
@@ -10,7 +10,7 @@ GlobalKey<PlaceholderState> placeholderKey = new GlobalKey<PlaceholderState>(); Key tapTarget = new Key('tap-target'); - tester.pumpWidget(new App( + tester.pumpWidget(new MaterialApp( routes: { '/': (RouteArguments args) { return new GestureDetector(