Rename App to MaterialApp
MaterialApp assumes that you're using material design. Also move radial reaction and fix imports for stats box.
This commit is contained in:
@@ -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_button.dart';
|
||||
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/shadows.dart';
|
||||
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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -23,6 +23,7 @@ export 'src/rendering/proxy_box.dart';
|
||||
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';
|
||||
|
||||
@@ -23,21 +23,15 @@ const TextStyle _errorTextStyle = const TextStyle(
|
||||
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 @@ class App extends StatefulComponent {
|
||||
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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,7 +10,7 @@ void main() {
|
||||
testWidgets((WidgetTester tester) {
|
||||
NavigatorState navigator;
|
||||
tester.pumpWidget(
|
||||
new App(
|
||||
new MaterialApp(
|
||||
routes: {
|
||||
'/': (RouteArguments args) {
|
||||
navigator = args.navigator;
|
||||
@@ -39,7 +39,7 @@ void main() {
|
||||
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;
|
||||
|
||||
@@ -10,7 +10,7 @@ void main() {
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user