mirror of
https://github.com/flutter/packages.git
synced 2025-07-02 16:39:13 +08:00
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:
@ -21,7 +21,7 @@ You can use [hyperlinks](hyperlink) in markdown
|
|||||||
## Code blocks
|
## Code blocks
|
||||||
Formatted Dart code looks really pretty too. This is an example of how to create your own Markdown widget:
|
Formatted Dart code looks really pretty too. This is an example of how to create your own Markdown widget:
|
||||||
|
|
||||||
new Markdown(data: "Hello _world_!");
|
new Markdown(data: 'Hello _world_!');
|
||||||
|
|
||||||
Enjoy!
|
Enjoy!
|
||||||
""";
|
""";
|
||||||
@ -29,11 +29,9 @@ Enjoy!
|
|||||||
void main() {
|
void main() {
|
||||||
runApp(new MaterialApp(
|
runApp(new MaterialApp(
|
||||||
title: "Markdown Demo",
|
title: "Markdown Demo",
|
||||||
routes: <String, WidgetBuilder>{
|
home: new Scaffold(
|
||||||
'/': (BuildContext context) => new Scaffold(
|
appBar: new AppBar(title: new Text('Markdown Demo')),
|
||||||
appBar: new AppBar(title: new Text("Markdown Demo")),
|
body: new Markdown(data: _kMarkdownData)
|
||||||
body: new Markdown(data: _kMarkdownData)
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user