From 3fd0ba6a31386dc04f6737a5d21c54d64ab97b3d Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Wed, 20 Apr 2016 09:33:28 -0700 Subject: [PATCH] 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. --- packages/flutter_markdown/example/demo.dart | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/flutter_markdown/example/demo.dart b/packages/flutter_markdown/example/demo.dart index 7877fe2b0d..ceb9e482a6 100644 --- a/packages/flutter_markdown/example/demo.dart +++ b/packages/flutter_markdown/example/demo.dart @@ -21,7 +21,7 @@ You can use [hyperlinks](hyperlink) in markdown ## Code blocks 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! """; @@ -29,11 +29,9 @@ Enjoy! void main() { runApp(new MaterialApp( title: "Markdown Demo", - routes: { - '/': (BuildContext context) => new Scaffold( - appBar: new AppBar(title: new Text("Markdown Demo")), - body: new Markdown(data: _kMarkdownData) - ) - } + home: new Scaffold( + appBar: new AppBar(title: new Text('Markdown Demo')), + body: new Markdown(data: _kMarkdownData) + ) )); }