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

Side by Side Diff: sky/examples/raw/navigation.dart

Issue 1190793002: Rename UINode to Widget. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/examples/stocks2/lib/stock_app.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 import 'package:sky/widgets/basic.dart';
6 import 'package:sky/widgets/navigator.dart';
7 import 'package:sky/widgets/raised_button.dart';
8
9 List<Route> routes = [
10 new Route(
11 name: 'safety',
12 builder: (navigator) => new RaisedButton(
13 child: new Text('PRESS FORWARD'),
14 onPressed: () => navigator.pushNamedRoute('adventure')
15 )
16 ),
17 new Route(
18 name: 'adventure',
19 builder: (navigator) => new RaisedButton(
20 child: new Text('NO WAIT! GO BACK!'),
21 onPressed: () => navigator.pushRoute(routes[0])
22 )
23 )
24 ];
25
26 class NavigationExampleApp extends App {
27 UINode build() {
28 return new Navigator(routes: routes);
29 }
30 }
31
32 void main() {
33 App app = new NavigationExampleApp();
34 }
OLDNEW
« no previous file with comments | « no previous file | sky/examples/stocks2/lib/stock_app.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698