From cf0fe5faf986efabe8a791e9c771eeb0dc376226 Mon Sep 17 00:00:00 2001 From: Hixie Date: Fri, 2 Oct 2015 15:27:11 -0700 Subject: [PATCH] Assert that App(routes) is not null. This is probably a sign that you're using fn2 still. --- packages/flutter/lib/src/widgets/app.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/flutter/lib/src/widgets/app.dart b/packages/flutter/lib/src/widgets/app.dart index 79f9bbab10..64eb172acf 100644 --- a/packages/flutter/lib/src/widgets/app.dart +++ b/packages/flutter/lib/src/widgets/app.dart @@ -32,7 +32,15 @@ class App extends StatefulComponent { this.theme, this.routes, 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 ThemeData theme;