Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
todomvc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eugene Shen
todomvc
Commits
fe473ce1
Commit
fe473ce1
authored
Mar 15, 2015
by
Mathieu Lorber
Committed by
Sindre Sorhus
Mar 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update
parent
0b2c6723
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3045 additions
and
14144 deletions
+3045
-14144
examples/vanilladart/build/web/dart/app.dart.js
examples/vanilladart/build/web/dart/app.dart.js
+3027
-14136
examples/vanilladart/lib/uuid.dart
examples/vanilladart/lib/uuid.dart
+13
-0
examples/vanilladart/pubspec.yaml
examples/vanilladart/pubspec.yaml
+2
-3
examples/vanilladart/web/dart/TodoApp.dart
examples/vanilladart/web/dart/TodoApp.dart
+1
-3
examples/vanilladart/web/dart/app.dart
examples/vanilladart/web/dart/app.dart
+2
-2
No files found.
examples/vanilladart/build/web/dart/app.dart.js
View file @
fe473ce1
This diff is collapsed.
Click to expand it.
examples/vanilladart/lib/uuid.dart
0 → 100644
View file @
fe473ce1
library
uuid
;
import
'dart:math'
;
Random
_random
=
new
Random
();
String
uuid
(
)
{
return
"
${_S4()}${_S4()}
-
${_S4()}
-
${_S4()}
-
${_S4()}
-
${_S4()}${_S4()}${_S4()}
"
;
}
String
_S4
(
)
{
return
_random
.
nextInt
(
65536
).
toRadixString
(
16
);
}
examples/vanilladart/pubspec.yaml
View file @
fe473ce1
name
:
todomvc_vanilladart
name
:
todomvc_vanilladart
version
:
1.0.
0
version
:
1.0.
1
description
:
TodoMVC built with Dart. Simple, vanilla Dart.
description
:
TodoMVC built with Dart. Simple, vanilla Dart.
dependencies
:
dependencies
:
browser
:
any
browser
:
any
\ No newline at end of file
uuid
:
any
\ No newline at end of file
examples/vanilladart/web/dart/TodoApp.dart
View file @
fe473ce1
...
@@ -2,8 +2,6 @@ part of todomvc;
...
@@ -2,8 +2,6 @@ part of todomvc;
class
TodoApp
{
class
TodoApp
{
static
final
Uuid
uuid
=
new
Uuid
();
List
<
TodoWidget
>
todoWidgets
=
new
List
<
TodoWidget
>();
List
<
TodoWidget
>
todoWidgets
=
new
List
<
TodoWidget
>();
Element
todoListElement
=
querySelector
(
'#todo-list'
);
Element
todoListElement
=
querySelector
(
'#todo-list'
);
...
@@ -44,7 +42,7 @@ class TodoApp {
...
@@ -44,7 +42,7 @@ class TodoApp {
if
(
e
.
keyCode
==
KeyCode
.
ENTER
)
{
if
(
e
.
keyCode
==
KeyCode
.
ENTER
)
{
var
title
=
newTodoElement
.
value
.
trim
();
var
title
=
newTodoElement
.
value
.
trim
();
if
(
title
.
isNotEmpty
)
{
if
(
title
.
isNotEmpty
)
{
addTodo
(
new
Todo
(
uuid
.
v4
(),
title
));
addTodo
(
new
Todo
(
uuid
(),
title
));
newTodoElement
.
value
=
''
;
newTodoElement
.
value
=
''
;
updateFooterDisplay
();
updateFooterDisplay
();
save
();
save
();
...
...
examples/vanilladart/web/dart/app.dart
View file @
fe473ce1
...
@@ -3,8 +3,8 @@ library todomvc;
...
@@ -3,8 +3,8 @@ library todomvc;
import
'dart:html'
import
'dart:html'
show
Element
,
InputElement
,
KeyCode
,
KeyboardEvent
,
querySelector
,
window
;
show
Element
,
InputElement
,
KeyCode
,
KeyboardEvent
,
querySelector
,
window
;
import
'dart:convert'
show
HtmlEscape
,
JSON
;
import
'dart:convert'
show
HtmlEscape
,
JSON
;
import
'package:
uuid/uuid
.dart'
;
import
'package:
todomvc_vanilladart/models
.dart'
;
import
'package:todomvc_vanilladart/
models.dart'
show
Todo
;
import
'package:todomvc_vanilladart/
uuid.dart'
;
part
'TodoWidget.dart'
;
part
'TodoWidget.dart'
;
part
'TodoApp.dart'
;
part
'TodoApp.dart'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment