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

Unified Diff: samples/todomvc/model.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/todomvc/ios/TodoMVCTests/TodoMVCTests.m ('k') | samples/todomvc/todomvc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/todomvc/model.dart
diff --git a/samples/todomvc/model.dart b/samples/todomvc/model.dart
deleted file mode 100644
index ce5ce0e7b9eb81a92dccb46d2b076c46c2b58641..0000000000000000000000000000000000000000
--- a/samples/todomvc/model.dart
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE.md file.
-
-library todomvc.model;
-
-// Very simple model for a collection of TODO items.
-
-class Item {
- String title;
- bool _done = false;
-
- Item(this.title);
-
- bool get done => _done;
- void complete() { _done = true; }
- void uncomplete() { _done = false; }
-}
-
-class Model {
- List<Item> todos;
-
- Model() : todos = new List<Item>();
-
- void createItem(String title) {
- assert(title.isNotEmpty);
- Item item = new Item(title);
- todos.add(item);
- }
-
- void deleteItem(int id) {
- if (id < todos.length) {
- todos.removeAt(id);
- }
- }
-
- void completeItem(int id) {
- if (id < todos.length) {
- todos[id].complete();
- }
- }
-
- void uncompleteItem(int id) {
- if (id < todos.length) {
- todos[id].uncomplete();
- }
- }
-
- void clearItems() {
- todos.removeWhere((item) => item.done);
- }
-
-}
« no previous file with comments | « samples/todomvc/ios/TodoMVCTests/TodoMVCTests.m ('k') | samples/todomvc/todomvc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698