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

Side by Side Diff: pkg/immi_samples/lib/menu.dart

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 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 | « pkg/immi_samples/lib/login_presenter.immi ('k') | pkg/immi_samples/lib/menu.immi » ('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 (c) 2015, the Dartino project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:immi/dart/immi.dart';
6
7 // Export generated code for nodes in menu.immi
8 import 'package:immi/dart/menu.dart';
9 export 'package:immi/dart/menu.dart';
10
11 class MenuItem {
12 String title;
13 Function select;
14
15 MenuItem(this.title, this.select);
16
17 MenuItemNode present(Node previous) {
18 return new MenuItemNode(title: title, select:select);
19 }
20 }
21
22 class Menu {
23 String title;
24 List<MenuItem> items = [];
25
26 Menu(this.title);
27
28 void add(MenuItem item) {
29 items.add(item);
30 }
31
32 MenuNode present(Node previous) {
33 return new MenuNode(
34 title: title,
35 items:items.map((item) => item.present(null)).toList());
36 }
37 }
OLDNEW
« no previous file with comments | « pkg/immi_samples/lib/login_presenter.immi ('k') | pkg/immi_samples/lib/menu.immi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698