Hide routes from the API when they're not needed. (#3431)
The 'routes' table is a point of confusion with new developers. By providing a 'home' argument that sets the '/' route, we can delay the point at which we teach developers about 'routes' until the point where they want to have a second route.
This commit is contained in:
@@ -24,9 +24,7 @@ class ComplexLayoutAppState extends State<ComplexLayoutApp> {
|
||||
return new MaterialApp(
|
||||
theme: lightTheme ? new ThemeData.light() : new ThemeData.dark(),
|
||||
title: 'Advanced Layout',
|
||||
routes: <String, WidgetBuilder>{
|
||||
'/': (BuildContext context) => new ComplexLayout(),
|
||||
}
|
||||
home: new ComplexLayout()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user