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:
Adam Barth
2015-10-09 10:19:35 -07:00
parent cceb4187cc
commit db3b9e8052
27 changed files with 36 additions and 40 deletions

View File

@@ -94,7 +94,7 @@ final ThemeData theme = new ThemeData(
);
void main() {
runApp(new App(
runApp(new MaterialApp(
title: 'Address Book',
theme: theme,
routes: <String, RouteBuilder>{

View File

@@ -201,7 +201,7 @@ class DemoHome extends StatelessComponent {
}
void main() {
runApp(new App(
runApp(new MaterialApp(
title: 'Flutter Demos',
theme: _theme,
routes: {

View File

@@ -125,7 +125,7 @@ class FitnessAppState extends State<FitnessApp> {
}
Widget build(BuildContext) {
return new App(
return new MaterialApp(
theme: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: Colors.indigo,

View File

@@ -53,7 +53,7 @@ class TestAppState extends State<TestApp> {
];
Widget build(BuildContext context) {
return new App(
return new MaterialApp(
title: 'EffectLine Demo',
theme: _theme,
routes: {

View File

@@ -81,7 +81,7 @@ class GameDemoState extends State<GameDemo> {
int _lastScore = 0;
Widget build(BuildContext context) {
return new App(
return new MaterialApp(
title: 'Asteroids',
theme: _theme,
routes: {

View File

@@ -32,7 +32,7 @@ main() async {
runApp(_app);
}
class TestBedApp extends App {
class TestBedApp extends MaterialApp {
Widget build() {
ThemeData theme = new ThemeData(

View File

@@ -32,7 +32,7 @@ main() async {
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: {

View File

@@ -33,7 +33,7 @@ main() async {
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: {

View File

@@ -27,7 +27,7 @@ main() async {
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,

View File

@@ -87,7 +87,7 @@ class StocksAppState extends State<StocksApp> {
}
Widget build(BuildContext context) {
return new App(
return new MaterialApp(
title: 'Stocks',
theme: theme,
routes: <String, RouteBuilder>{

View File

@@ -372,7 +372,7 @@ class CardCollectionState extends State<CardCollection> {
}
void main() {
runApp(new App(
runApp(new MaterialApp(
title: 'Cards',
routes: {
'/': (RouteArguments args) => new CardCollection(navigator: args.navigator),

View File

@@ -129,7 +129,7 @@ class DragAndDropAppState extends State<DragAndDropApp> {
}
void main() {
runApp(new App(
runApp(new MaterialApp(
title: 'Drag and Drop Flutter Demo',
routes: {
'/': (RouteArguments args) => new DragAndDropApp(navigator: args.navigator)

View File

@@ -13,7 +13,7 @@ class CardModel {
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);

View File

@@ -56,7 +56,7 @@ class IndexedStackDemoState extends State<IndexedStackDemo> {
}
void main() {
runApp(new App(
runApp(new MaterialApp(
title: 'IndexedStackDemo',
theme: new ThemeData(
brightness: ThemeBrightness.light,

View File

@@ -57,7 +57,7 @@ final ThemeData theme = new ThemeData(
);
void main() {
runApp(new App(
runApp(new MaterialApp(
title: 'Navigation Example',
theme: theme,
routes: routes

View File

@@ -156,7 +156,7 @@ class OverlayGeometryAppState extends State<OverlayGeometryApp> {
}
void main() {
runApp(new App(
runApp(new MaterialApp(
theme: new ThemeData(
brightness: ThemeBrightness.light,
primarySwatch: Colors.blue,

View File

@@ -156,7 +156,7 @@ class PageableListAppState extends State<PageableListApp> {
}
void main() {
runApp(new App(
runApp(new MaterialApp(
title: 'PageableList',
theme: new ThemeData(
brightness: ThemeBrightness.light,

View File

@@ -16,7 +16,7 @@ RenderBox initCircle() {
);
}
class SectorApp extends App {
class SectorApp extends MaterialApp {
RenderBoxToRenderSectorAdapter sectors = initCircle();
math.Random rand = new math.Random(1);