Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: sky/examples/widgets/navigation.dart

Issue 1191153002: Make back button control drawer in stocks app (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: abarth feedback Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/stocks2/lib/stock_home.dart ('k') | sky/sdk/lib/widgets/drawer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/widgets/navigation.dart
diff --git a/sky/examples/widgets/navigation.dart b/sky/examples/widgets/navigation.dart
index 6f1d3d99bdf11d0ce5ffdb45a0784881ed7b8aaf..82a9b35bbc7c0ccbe1eb536e8bb017aac1588011 100644
--- a/sky/examples/widgets/navigation.dart
+++ b/sky/examples/widgets/navigation.dart
@@ -4,13 +4,12 @@
import 'package:sky/widgets/basic.dart';
import 'package:sky/widgets/navigator.dart';
-import 'package:sky/widgets/transition.dart';
import 'package:sky/widgets/raised_button.dart';
List<Route> routes = [
new Route(
name: 'home',
- builder: (navigator) => new Container(
+ builder: (navigator, route) => new Container(
padding: const EdgeDims.all(20.0),
decoration: new BoxDecoration(backgroundColor: const Color(0xFFCCCCCC)),
child: new Block([
@@ -28,14 +27,14 @@ List<Route> routes = [
),
new Route(
name: 'shopping',
- builder: (navigator) => new Container(
+ builder: (navigator, route) => new Container(
padding: const EdgeDims.all(20.0),
decoration: new BoxDecoration(backgroundColor: const Color(0xFFBF5FFF)),
child: new Block([
new Text("Village Shop"),
new RaisedButton(
child: new Text('RETURN HOME'),
- onPressed: () => navigator.back()
+ onPressed: () => navigator.pop()
),
new RaisedButton(
child: new Text('GO TO DUNGEON'),
@@ -46,7 +45,7 @@ List<Route> routes = [
),
new Route(
name: 'adventure',
- builder: (navigator) => new Container(
+ builder: (navigator, route) => new Container(
padding: const EdgeDims.all(20.0),
decoration: new BoxDecoration(backgroundColor: const Color(0xFFDC143C)),
child: new Block([
« no previous file with comments | « sky/examples/stocks2/lib/stock_home.dart ('k') | sky/sdk/lib/widgets/drawer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698