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

Side by Side Diff: samples/tracker/web/tracker_app.dart

Issue 27618002: package:observe fix various api issues (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library tracker.web.tracker_app; 5 library tracker.web.tracker_app;
6 6
7 import 'package:polymer/polymer.dart'; 7 import 'package:polymer/polymer.dart';
8 import 'package:tracker/models.dart'; 8 import 'package:tracker/models.dart';
9 import 'package:tracker/seed.dart' as seed; 9 import 'package:tracker/seed.dart' as seed;
10 10
11 @CustomTag('tracker-app') 11 @CustomTag('tracker-app')
12 class TrackerApp extends PolymerElement with ObservableMixin { 12 class TrackerApp extends PolymerElement with Observable {
13 bool get applyAuthorStyles => true; 13 bool get applyAuthorStyles => true;
14 @observable final ObservableList<Task> tasks = toObservable([]); 14 @observable final ObservableList<Task> tasks = toObservable([]);
15 @observable Tracker app; 15 @observable Tracker app;
16 @observable Task newTask = new Task.unsaved(); 16 @observable Task newTask = new Task.unsaved();
17 @observable String searchParam = ''; 17 @observable String searchParam = '';
18 @observable bool usingForm = false; 18 @observable bool usingForm = false;
19 19
20 // Buckets for grouping tasks by status. 20 // Buckets for grouping tasks by status.
21 @observable List<Task> current = toObservable([]); 21 @observable List<Task> current = toObservable([]);
22 @observable List<Task> pending = toObservable([]); 22 @observable List<Task> pending = toObservable([]);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 if (task.status == Task.CURRENT) { 86 if (task.status == Task.CURRENT) {
87 current.add(task); 87 current.add(task);
88 } else if (task.status == Task.PENDING) { 88 } else if (task.status == Task.PENDING) {
89 pending.add(task); 89 pending.add(task);
90 } else { 90 } else {
91 completed.add(task); 91 completed.add(task);
92 } 92 }
93 } 93 }
94 } 94 }
95 } 95 }
OLDNEW
« no previous file with comments | « samples/tracker/web/task_form_element.dart ('k') | samples/word-finder/web/word_finder_element.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698