Creates a MaterialApp.
At least one of home, routes, or onGenerateRoute must be
given. If only routes is given, it must include an entry for
the Navigator.defaultRouteName ('/'
).
This class creates an instance of WidgetsApp.
Source
MaterialApp({ Key key, this.title, this.color, this.theme, this.home, this.routes: const <String, WidgetBuilder>{}, this.initialRoute, this.onGenerateRoute, this.onLocaleChanged, this.debugShowMaterialGrid: false, this.showPerformanceOverlay: false, this.checkerboardRasterCacheImages: false, this.showSemanticsDebugger: false, this.debugShowCheckedModeBanner: true }) : super(key: key) { assert(debugShowMaterialGrid != null); assert(routes != null); assert(!routes.containsKey(Navigator.defaultRouteName) || (home == null)); assert(routes.containsKey(Navigator.defaultRouteName) || (home != null) || (onGenerateRoute != null)); }