Merge pull request #1467 from Hixie/app-help
Assert that App(routes) is not null.
This commit is contained in:
commit
aea7792912
@ -32,7 +32,15 @@ class App extends StatefulComponent {
|
|||||||
this.theme,
|
this.theme,
|
||||||
this.routes,
|
this.routes,
|
||||||
this.onGenerateRoute
|
this.onGenerateRoute
|
||||||
}): super(key: key);
|
}): 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;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
final String title;
|
final String title;
|
||||||
final ThemeData theme;
|
final ThemeData theme;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user