├── .atomignore ├── serve.sh ├── .bazelrc ├── web ├── sw-import.js ├── images │ └── logo.png ├── main.dart └── index.html ├── .gitignore ├── .analysis_options ├── README.md ├── test ├── todo_test.html └── todo_test.dart ├── lib └── index.dart ├── todo_common ├── pubspec.yaml └── lib │ └── model.dart ├── todo_main ├── pubspec.yaml ├── lib │ ├── todo_list.html │ ├── todo_list.dart │ ├── todo_main.html │ └── todo_main.dart └── pubspec.lock ├── todo_renderer ├── pubspec.yaml ├── pubspec.lock └── lib │ ├── todo_renderer.html │ └── todo_renderer.dart ├── pubspec.yaml └── pubspec.lock /.atomignore: -------------------------------------------------------------------------------- 1 | bazel-* 2 | 3 | -------------------------------------------------------------------------------- /serve.sh: -------------------------------------------------------------------------------- 1 | ( cd bazel-bin ; serve ) 2 | -------------------------------------------------------------------------------- /.bazelrc: -------------------------------------------------------------------------------- 1 | build --worker_max_instances=1 --strategy=Polymerize=worker 2 | -------------------------------------------------------------------------------- /web/sw-import.js: -------------------------------------------------------------------------------- 1 | importScripts('bower_components/platinum-sw/service-worker.js'); 2 | -------------------------------------------------------------------------------- /web/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/polymer-dart/todo_ddc/HEAD/web/images/logo.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | packages 2 | .packages 3 | bazel-* 4 | BUILD 5 | WORKSPACE 6 | .polymerize 7 | .pub 8 | build 9 | -------------------------------------------------------------------------------- /web/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:polymer_element/polymer_element.dart'; 2 | import 'package:todo_ddc/index.dart'; 3 | 4 | @entryPoint 5 | void main() => index(); 6 | -------------------------------------------------------------------------------- /.analysis_options: -------------------------------------------------------------------------------- 1 | analyzer: 2 | strong-mode: true 3 | # language: 4 | # enableConditionalDirectives: true 5 | exclude: 6 | - bazel-*/** 7 | - WORKSPACE 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sample mini todo APP for Polymer2-Dart-DDC Project 2 | 3 | This is a very sample dart polymer-2 (polymerized) project to demostrate 4 | how to use `polymerize` to build polymer-2 apps using Dart.. 5 | 6 | ## How to build 7 | 8 | 1. update deps with `pub get` 9 | 2. run `pub build` 10 | 11 | 12 | ## How to run the project 13 | 14 | 1. do a `pub serve` 15 | 2. Open a browser on `http://localhost:8080` 16 | 17 | 18 | -------------------------------------------------------------------------------- /test/todo_test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Custom HTML Test 6 | 7 | 8 | 11 | 12 | 13 | // ... 14 | 15 | 16 | -------------------------------------------------------------------------------- /lib/index.dart: -------------------------------------------------------------------------------- 1 | import 'package:html5/html.dart'; 2 | import 'package:polymerize_common/init.dart'; 3 | import 'package:todo_main/todo_main.dart'; 4 | import 'package:polymer_elements/web_animations_js.dart'; 5 | import 'package:polymer_elements/platinum_sw_register.dart'; 6 | import 'package:polymer_elements/platinum_sw_cache.dart'; 7 | import 'package:polymer_elements/iron_flex_layout.dart'; 8 | 9 | 10 | @init 11 | main() { 12 | print("hello here we are!!"); 13 | } 14 | 15 | index() { 16 | print("INDEX"); 17 | PlatinumSwRegister reg = window.document.querySelector('#reg'); 18 | reg.register(); 19 | } 20 | -------------------------------------------------------------------------------- /todo_common/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: todo_common 2 | description: Sample TODO app with polymer2+DDC 3 | version: 0.0.1 4 | dependencies: 5 | logging: any 6 | polymer_element: any 7 | built_collection: "^1.4.0" 8 | 9 | # path: ../../polymer_element 10 | dependency_overrides: 11 | polymer_element: 12 | path: ../../polymer_element 13 | polymerize_common: 14 | path: ../../polymerize_common 15 | # polymer_elements: 16 | # path: /home/vittorio/Develop/dart/polymer_elements 17 | html5: 18 | path: ../../html_lib 19 | polymer_elements: 20 | git: 21 | url: https://github.com/polymer-dart/polymerize_elements.git 22 | ref: v0.3.4 23 | # js: 24 | # path: /home/vittorio/.pub-cache/hosted/pub.dartlang.org/js-0.6.1 25 | dev_dependencies: 26 | # polymerize: ^0.8.5 27 | polymerize: 28 | path: ../../polymerize 29 | 30 | transformers: 31 | - polymerize -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 9 | 10 | 11 | 12 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /todo_main/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: todo_main 2 | description: Sample TODO app with polymer2+DDC 3 | version: 0.0.1 4 | dependencies: 5 | logging: any 6 | todo_common: 7 | path: ../todo_common 8 | todo_renderer: 9 | path: ../todo_renderer 10 | polymer_element: any 11 | # js: any 12 | polymer_elements: any 13 | 14 | dependency_overrides: 15 | polymer_element: 16 | path: ../../polymer_element 17 | polymerize_common: 18 | path: ../../polymerize_common 19 | # polymer_elements: 20 | # path: /home/vittorio/Develop/dart/polymer_elements 21 | html5: 22 | path: ../../html_lib 23 | polymer_elements: 24 | git: 25 | url: https://github.com/polymer-dart/polymerize_elements.git 26 | ref: v0.3.4 27 | # js: 28 | # path: /home/vittorio/.pub-cache/hosted/pub.dartlang.org/js-0.6.1 29 | dev_dependencies: 30 | # polymerize: ^0.8.5 31 | polymerize: 32 | path: ../../polymerize 33 | 34 | transformers: 35 | - polymerize -------------------------------------------------------------------------------- /todo_renderer/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: todo_renderer 2 | description: Sample TODO app with polymer2+DDC 3 | version: 0.0.1 4 | dependencies: 5 | logging: any 6 | todo_common: 7 | path: ../todo_common 8 | polymer_element: any 9 | # js: any 10 | polymer_elements: any 11 | # path: ../../polymer_element 12 | # path: ../../polymer_element 13 | dependency_overrides: 14 | polymer_element: 15 | path: ../../polymer_element 16 | polymerize_common: 17 | path: ../../polymerize_common 18 | # polymer_elements: 19 | # path: /home/vittorio/Develop/dart/polymer_elements 20 | html5: 21 | path: ../../html_lib 22 | polymer_elements: 23 | git: 24 | url: https://github.com/polymer-dart/polymerize_elements.git 25 | ref: v0.3.4 26 | # js: 27 | # path: /home/vittorio/.pub-cache/hosted/pub.dartlang.org/js-0.6.1 28 | dev_dependencies: 29 | # polymerize: ^0.8.5 30 | polymerize: 31 | path: ../../polymerize 32 | 33 | transformers: 34 | - polymerize -------------------------------------------------------------------------------- /todo_renderer/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See http://pub.dartlang.org/doc/glossary.html#lockfile 3 | packages: 4 | html5: 5 | description: 6 | name: html5 7 | url: "http://pub.drafintech.it:5001" 8 | source: hosted 9 | version: "0.0.5" 10 | js: 11 | description: 12 | name: js 13 | url: "http://pub.drafintech.it:5001" 14 | source: hosted 15 | version: "0.6.1" 16 | logging: 17 | description: 18 | name: logging 19 | url: "http://pub.drafintech.it:5001" 20 | source: hosted 21 | version: "0.11.3+1" 22 | polymer_element: 23 | description: 24 | path: "../../polymer_element" 25 | relative: true 26 | source: path 27 | version: "0.7.0" 28 | polymer_elements: 29 | description: 30 | path: "../../polymer_elements" 31 | relative: true 32 | source: path 33 | version: "2.0.0-preview.1" 34 | todo_common: 35 | description: 36 | path: "../todo_common" 37 | relative: true 38 | source: path 39 | version: "0.0.1" 40 | sdks: 41 | dart: ">=1.19.0-dev.0.0 <2.0.0" 42 | -------------------------------------------------------------------------------- /todo_main/lib/todo_list.html: -------------------------------------------------------------------------------- 1 | 2 | 27 | -------------------------------------------------------------------------------- /test/todo_test.dart: -------------------------------------------------------------------------------- 1 | @TestOn('chrome') 2 | library mytest; 3 | 4 | import 'package:html5/html.dart'; 5 | import 'package:polymer_element/polymer_element.dart'; 6 | import 'package:test/test.dart'; 7 | import 'dart:async'; 8 | import 'package:todo_main/todo_main.dart'; 9 | 10 | @entryPoint 11 | void main() { 12 | group('test.framework.works', () { 13 | test('simple test', () { 14 | print('ok then'); 15 | }); 16 | test("simple async test", () async { 17 | var value = await new Future.value(10); 18 | print('Hi man! : ${value}'); 19 | expect(value, equals(10)); 20 | }); 21 | }); 22 | 23 | group('some more usefull tests',() { 24 | test('creating and using polymerize component',()async { 25 | TodoMain main = document.createElement('todo-main'); 26 | body.appendChild(main); 27 | await new Future(()=>0); 28 | main.newText = 'some text'; 29 | await new Future(()=>0); 30 | assert(main.canAdd,'can add is true'); 31 | main.addTodo(null, null); 32 | await new Future(()=>0); 33 | assert(main.todos.isNotEmpty,'something happened'); 34 | assert(main.todos[0].text=='some text','text is right'); 35 | }); 36 | }); 37 | } 38 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: todo_ddc 2 | description: Sample TODO app with polymer2+DDC 3 | version: 0.0.1 4 | dependencies: 5 | logging: any 6 | todo_main: 7 | path: todo_main 8 | polymer_element: "^2.0.2" 9 | polymerize: ^0.9.6 10 | 11 | # polymer_elements: 12 | # git: 13 | # url: https://github.com/dam0vm3nt/polymerize_elements.git 14 | # ref: v0.1.0 15 | # polymer_element: 16 | # path: ../polymer_element 17 | 18 | web: 19 | compiler: 20 | release: dartdevc 21 | debug: dartdevc 22 | 23 | 24 | dependency_overrides: 25 | # polymer_element: 26 | # path: ../polymer_element 27 | # polymerize_common: 28 | # path: ../polymerize_common 29 | # polymer_elements: 30 | # path: /home/vittorio/Develop/dart/polymer_elements 31 | # html5: 32 | # path: ../html_lib 33 | polymer_elements: 34 | # path: ../polymer_elements 35 | git: 36 | url: https://github.com/polymer-dart/polymerize_elements.git 37 | ref: v0.4.1 38 | # js: 39 | # path: /home/vittorio/.pub-cache/hosted/pub.dartlang.org/js-0.6.1 40 | # polymerize: 41 | # path: ../polymerize 42 | dev_dependencies: 43 | test: any 44 | # polymerize: ^0.8.5 45 | 46 | transformers: 47 | - polymerize: 48 | entry-points: 49 | - web/*.dart 50 | - test/*.dart 51 | - test/pub_serve: 52 | $include: xtest/*.dart 53 | -------------------------------------------------------------------------------- /todo_main/lib/todo_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:html5/html.dart'; 2 | import 'package:polymer_element/observe.dart'; 3 | import 'package:polymer_element/polymer_element.dart'; 4 | import 'package:todo_common/model.dart'; 5 | import 'package:todo_renderer/todo_renderer.dart'; 6 | import 'package:polymer_elements/paper_input.dart'; 7 | import 'package:polymer_elements/paper_button.dart'; 8 | 9 | class MyObservedObject { 10 | String myNestedProperty; 11 | // Recursive declarations are handled nicely (unless there's a recursive graph, that's impossible to notify correctly) 12 | MyObservedObject mySubNestedProperty; 13 | } 14 | 15 | 16 | @PolymerRegister('todo-list',template: 'todo_list.html') 17 | abstract class TodoList extends PolymerElement implements AutonotifyBehavior { 18 | List todos; 19 | MyObservedObject myObservedObject; 20 | 21 | String newNestedValue; 22 | 23 | DomRepeat get rpt=>shadowRoot.querySelector("#rpt"); 24 | 25 | void removeMe(CustomEvent ev) { 26 | int p = rpt.indexForElement(ev.target); 27 | // Note : this would normally require to use list accessor polymer apis, unless using autonotify. 28 | todos.removeAt(p); 29 | } 30 | 31 | @Observe('newNestedValue') 32 | void updateNestedValue(_) { 33 | // Note this normally won't trigger a notify (it's a nested prop). 34 | // But 'AutonotifyBehavior' will make it happen... 35 | myObservedObject.myNestedProperty = newNestedValue; 36 | // Even more these one : 37 | myObservedObject.mySubNestedProperty.myNestedProperty = newNestedValue; 38 | } 39 | 40 | @override 41 | connectedCallback() { 42 | super.connectedCallback(); 43 | myObservedObject = new MyObservedObject() 44 | ..mySubNestedProperty = new MyObservedObject(); 45 | } 46 | 47 | void reset(_) { 48 | myObservedObject.mySubNestedProperty = new MyObservedObject() 49 | ..myNestedProperty="RESETTED"; 50 | } 51 | 52 | 53 | } -------------------------------------------------------------------------------- /todo_renderer/lib/todo_renderer.html: -------------------------------------------------------------------------------- 1 | 2 | 63 | 64 | -------------------------------------------------------------------------------- /todo_main/lib/todo_main.html: -------------------------------------------------------------------------------- 1 | 2 | 111 | 112 | -------------------------------------------------------------------------------- /todo_common/lib/model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:polymer_element/polymer_element.dart'; 3 | import 'package:js/js.dart'; 4 | import 'package:polymer_element/polymerize_js.dart'; 5 | import 'package:polymer_element/redux_local.dart'; 6 | import 'package:polymer_element/dart_callbacks_behavior.dart'; 7 | import 'package:built_collection/built_collection.dart'; 8 | 9 | int _id = 0; 10 | 11 | class TodoDTO { 12 | int id = _id++; 13 | bool status; 14 | String text; 15 | 16 | TodoDTO({this.status: false, this.text}); 17 | 18 | toJson() => {'status': status, 'text': text}; 19 | } 20 | 21 | class ModelDTO { 22 | List todos = []; 23 | } 24 | 25 | ModelDTO model = new ModelDTO(); 26 | 27 | ModelDTO getModel() => model; 28 | 29 | /** 30 | * The reducer 31 | */ 32 | myReducer(MyState state, ReduxAction action) { 33 | if (action.type == 'RESTORE_DATA') { 34 | if (action.detail != state.jsonData) { 35 | print("DECODING STATE FROM ${action.detail}"); 36 | List todos = new List.from((JSON.decode(action.detail) as Iterable).map((x) => new TodoDTO(status: x['status'], text: x['text']))); 37 | return new MyState(todos: todos, jsonData: action.detail); 38 | } else { 39 | print("IGNORING STATE DECODEING BECAUSE data not changed"); 40 | return state; 41 | } 42 | } else { 43 | List todos = _reduceTodos(state?.todos, action); 44 | String jsonData = JSON.encode(todos); 45 | print("NEW JSON DATA : ${jsonData}"); 46 | return new MyState(todos: todos, jsonData: jsonData); 47 | } 48 | } 49 | 50 | typedef ListBuilder todoReducer(ReduxAction action,ListBuilder builder); 51 | 52 | final Map reducer = { 53 | Actions.ADD_TODO : (ReduxAction addAction,listBuilder) => listBuilder 54 | ..add(addAction.detail), 55 | Actions.REMOVE_TODO: (ReduxAction remAction,listBuilder) => listBuilder 56 | ..removeAt(remAction.detail), 57 | Actions.UPDATE_TODO: (ReduxAction updateAction,listBuilder) { 58 | ReduxAction> a = updateAction; 59 | listBuilder[a.detail.pos]=a.detail.what; 60 | return listBuilder; 61 | } 62 | 63 | }; 64 | 65 | /** 66 | * Todo list reducer 67 | */ 68 | List _reduceTodos(List todos, ReduxAction action) { 69 | ListBuilder listBuilder = new ListBuilder(todos??[]); 70 | 71 | todoReducer r = reducer[action.type]; 72 | if (r==null) { 73 | return todos; 74 | } 75 | 76 | return new List.from(r(action,listBuilder).build()); 77 | } 78 | 79 | /** 80 | * My generic state 81 | */ 82 | class MyState { 83 | /// a list of todos 84 | final List todos; 85 | final String jsonData; 86 | 87 | MyState({this.todos: const [], this.jsonData}); 88 | } 89 | 90 | final globalStore = createStore(myReducer); 91 | 92 | /** 93 | * Redux behavior associated to store `myStore`. 94 | * Implemented with a canonical behavior. 95 | */ 96 | @PolymerBehavior("TodoDDC.MyReduxBehavior") 97 | abstract class MyReduxBehavior implements ReduxLocalBehavior, DartCallbacksBehavior { 98 | readyPostHook() { 99 | store = globalStore; 100 | } 101 | } 102 | 103 | class UpdateAt { 104 | X what; 105 | int pos; 106 | 107 | UpdateAt(this.pos,this.what); 108 | } 109 | 110 | /** 111 | * Utility class with action factories. 112 | */ 113 | class Actions { 114 | static const String ADD_TODO = 'ADD_TODO'; 115 | static const String REMOVE_TODO = 'REMOVE_TODO'; 116 | static const String UPDATE_TODO = 'UPDATE_TODO'; 117 | 118 | /** 119 | * Adds a todo to the list. 120 | */ 121 | static ReduxAction createAddTodoAction(TodoDTO todo) => new ReduxAction(type: ADD_TODO, detail: todo); 122 | 123 | static ReduxAction createUpdateTodoAction(TodoDTO todo, int at) => new ReduxAction(type: UPDATE_TODO, detail: new UpdateAt(at,todo)); 124 | /** 125 | * Removes a todo from the list 126 | */ 127 | static ReduxAction createRemoveTodoAction(int index) => new ReduxAction(type: REMOVE_TODO, detail: index); 128 | } 129 | -------------------------------------------------------------------------------- /todo_main/lib/todo_main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:html5/html.dart'; 3 | import 'package:polymer_element/dart_callbacks_behavior.dart'; 4 | import 'package:polymer_element/redux_local.dart'; 5 | import 'package:polymer_elements/iron_flex_layout.dart'; 6 | import 'package:polymer_elements/iron_icon.dart'; 7 | import 'package:polymer_elements/iron_icons.dart'; 8 | import 'package:polymer_element/polymer_element.dart'; 9 | import 'package:todo_common/model.dart'; 10 | import 'package:todo_renderer/todo_renderer.dart'; 11 | import 'package:polymer_elements/paper_input.dart'; 12 | import 'package:polymer_elements/paper_icon_button.dart'; 13 | import 'package:polymer_elements/paper_button.dart'; 14 | import 'package:polymer_elements/iron_validatable_behavior.dart'; 15 | import 'package:js/js.dart'; 16 | import 'package:js/js_util.dart'; 17 | import 'package:polymer_element/super.dart'; 18 | import 'package:polymer_elements/iron_meta.dart'; 19 | import 'package:polymer_elements/app_localstorage_document.dart'; 20 | import 'package:polymer_elements/app_header_layout.dart'; 21 | import 'package:polymer_elements/app_header.dart'; 22 | import 'package:polymer_elements/app_toolbar.dart'; 23 | import 'package:polymer_elements/app_scroll_effects.dart'; 24 | import 'package:polymer_element/observe.dart'; 25 | import 'todo_list.dart'; 26 | 27 | 28 | @PolymerBehavior("Sample.MyBehavior") 29 | abstract class MyBehavior implements DartCallbacksBehavior { 30 | String myProp; 31 | 32 | // TODO : THIS STILL NOT WORKING 33 | @Observe('myProp') 34 | void checkObserveOnBehavior(_) { 35 | print("My Prop has changed in a behavior (changed) :${myProp}"); 36 | } 37 | 38 | void readyPostHook() { 39 | myProp = 'Hello from a behavior'; 40 | } 41 | 42 | doSomething(Event ev, detail) { 43 | myProp = 'And now has changed'; 44 | } 45 | } 46 | 47 | @PolymerRegister('test-comp') 48 | abstract class MyTestComp extends PolymerElement implements MyBehavior { 49 | static String get template => """ 50 | 59 |
60 |

Hello, man! Embedded template here!

61 |
This value comes from a dart behavior (click to changeit): [[myProp]]
62 |
63 | """; 64 | } 65 | 66 | 67 | /** 68 | * A sample main 69 | */ 70 | 71 | @PolymerRegister('todo-main', template: 'todo_main.html') 72 | abstract class TodoMain extends PolymerElement implements MyReduxBehavior, MutableData, IronValidatableBehavior { 73 | String newText; 74 | @Property(statePath: 'todos') 75 | List todos = []; 76 | 77 | List todos2= []; 78 | 79 | bool canAdd; 80 | 81 | @Property(statePath:'jsonData') 82 | String jsonData; 83 | 84 | @Observe('jsonData') 85 | void restoreJson() { 86 | if (jsonData!=null) { 87 | print("DISPATCHING RESTORE DATA FOR ${jsonData}"); 88 | dispatch(new ReduxAction(type: 'RESTORE_DATA', detail: jsonData)); 89 | } 90 | } 91 | 92 | @Observe('newText') 93 | void checkLen(_) { 94 | set('canAdd', newText != null && newText.isNotEmpty); 95 | print("New text changed, can add : ${canAdd}"); 96 | } 97 | 98 | TodoMain() { 99 | } 100 | 101 | aTodoChanged(CustomEvent ev) { 102 | int pos = rpt.indexForElement(ev.target); 103 | print("TODO CHANGED :${pos} , ${ev.detail}"); 104 | dispatch(todoChanged(ev.detail['new'], pos)); 105 | } 106 | 107 | connectedCallback() { 108 | super.connectedCallback(); 109 | newText = ""; 110 | todos2 = observeSupport.makeObservable([]); 111 | } 112 | 113 | static ReduxAction todoChanged(TodoDTO newtodo, int at) => Actions.createUpdateTodoAction(newtodo, at); 114 | 115 | static ReduxAction addTodoAction(TodoDTO newTodo) => Actions.createAddTodoAction(newTodo); 116 | 117 | static ReduxAction removeTodoAction(int index) => Actions.createRemoveTodoAction(index); 118 | 119 | addTodo(Event ev, details) async { 120 | dispatch(addTodoAction(new TodoDTO(text: newText))); 121 | todos2.add(new TodoDTO(text:newText)); 122 | newText = ""; 123 | } 124 | 125 | DomRepeat get rpt => shadowRoot.querySelector("#rpt"); 126 | 127 | void removeIt(Event ev, TodoDTO todo) { 128 | int idx = rpt.indexForElement(ev.target); 129 | dispatch(removeTodoAction(idx)); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /todo_renderer/lib/todo_renderer.dart: -------------------------------------------------------------------------------- 1 | import 'package:html5/html.dart'; 2 | 3 | import 'package:polymer_element/polymerize_js.dart'; 4 | import 'package:todo_common/model.dart'; 5 | import 'package:polymer_element/polymer_element.dart'; 6 | import 'package:polymer_elements/paper_dialog.dart'; 7 | import 'package:polymer_elements/paper_checkbox.dart'; 8 | import 'package:polymer_elements/paper_icon_button.dart'; 9 | import 'package:polymer_elements/iron_icon.dart'; 10 | import 'package:polymer_elements/iron_icons.dart'; 11 | import 'package:polymer_elements/paper_material.dart'; 12 | import 'package:polymer_elements/paper_input.dart'; 13 | import 'package:polymer_elements/iron_flex_layout.dart'; 14 | import 'package:polymer_element/redux_local.dart'; 15 | 16 | import 'dart:async'; 17 | 18 | class RendererState { 19 | final TodoDTO todo; 20 | final bool editing; 21 | 22 | RendererState(this.todo, this.editing); 23 | } 24 | 25 | RendererState _updateRendererState(RendererState oldState, ReduxAction action) => 26 | new RendererState(_updateTodoDTO(oldState?.todo, action), _updateEditing(oldState?.editing, action)); 27 | 28 | TodoDTO _updateTodoDTO(TodoDTO oldTodo, ReduxAction action) { 29 | switch (action.type) { 30 | case 'UPDATE_TODO_TEXT': 31 | return new TodoDTO(status: oldTodo?.status, text: action.detail); 32 | case 'UPDATE_TODO_STATUS': 33 | return new TodoDTO(status: action.detail, text: oldTodo?.text); 34 | case 'INIT_STATE': 35 | return action.detail; 36 | } 37 | return oldTodo; 38 | } 39 | 40 | bool _updateEditing(bool oldEditing, ReduxAction action) { 41 | switch (action.type) { 42 | case 'UPDATE_EDITING': 43 | return action.detail; 44 | case 'INIT_STATE': 45 | return false; 46 | } 47 | 48 | return oldEditing; 49 | } 50 | 51 | /** 52 | * Renderer element 53 | */ 54 | @PolymerRegister('todo-renderer', 55 | template: 'todo_renderer.html', uses: const [PaperCheckbox, PaperIconButton, IronIcon, IronIcons, PaperMaterial, PaperInput, IronFlexLayout, PaperDialog]) 56 | abstract class TodoRenderer extends PolymerElement implements ReduxLocalBehavior { 57 | TodoDTO myTodo; 58 | 59 | @Observe('myTodo') 60 | void updateState() { 61 | print("My todo changed : ${myTodo} , ${todo} , dispatching : ${myTodo!=todo}"); 62 | if (myTodo != todo) dispatch(initState(myTodo)); 63 | } 64 | 65 | @Property(statePath: 'todo') 66 | TodoDTO todo; 67 | @Property(statePath: 'editing') 68 | bool editing; 69 | bool askConfirm; 70 | 71 | @Observe('todo') 72 | void notifyState() { 73 | print("Local todo changed ${todo} , ${myTodo}, notifying :${todo!=myTodo}"); 74 | if (myTodo != todo) { 75 | dispatchEvent(new CustomEvent('my-todo-changed', new CustomEventInit()..detail = {'old': myTodo, 'new': todo})); 76 | } 77 | } 78 | 79 | @Observe('askConfirm') 80 | void debugOpened(_) { 81 | print("Dialog open state has changed!"); 82 | } 83 | 84 | static ReduxAction initState(TodoDTO newText) => new ReduxAction(type: 'INIT_STATE', detail: newText); 85 | 86 | static ReduxAction updateTodoText(String newText) => new ReduxAction(type: 'UPDATE_TODO_TEXT', detail: newText); 87 | 88 | static ReduxAction updateTodoStatus(bool newStatus) => new ReduxAction(type: 'UPDATE_TODO_STATUS', detail: newStatus); 89 | 90 | static ReduxAction changeEditing(bool editing) => new ReduxAction(type: 'UPDATE_EDITING', detail: editing); 91 | 92 | startEdit(Event ev, details) => dispatch(changeEditing(true)); 93 | 94 | finishEdit(Event ev, details) => dispatch(changeEditing(false)); 95 | 96 | TodoRenderer() { 97 | askConfirm = false; 98 | store = createStore(_updateRendererState); 99 | } 100 | 101 | PaperInput get textField => this.shadowRoot.querySelector('#textField'); 102 | PaperCheckbox get statusCheckbox => this.shadowRoot.querySelector('#statusCheckbox'); 103 | 104 | void textChanged() => dispatch(updateTodoText(textField.value)); 105 | 106 | void statusChanged() => dispatch(updateTodoStatus(statusCheckbox.checked)); 107 | 108 | domChanged1(Event ev, details) { 109 | if (editing) { 110 | new Future(() { 111 | 112 | HTMLInputElement iee = textField.shadowRoot.querySelector('input'); 113 | iee.setSelectionRange(0, myTodo.text.length); 114 | iee.focus(); 115 | }); 116 | } 117 | } 118 | 119 | removeMe(Event ev, details) { 120 | //askConfirm = true; 121 | PaperDialog dlg = shadowRoot.querySelector('#dlg'); 122 | dlg.opened = true; 123 | print("DIALOG : ${dlg} , ${dlg.opened}"); 124 | } 125 | 126 | removeConfirmed(Event ev, details) { 127 | dispatchEvent(createCustomEvent('remove-me', myTodo)); 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /todo_main/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See http://pub.dartlang.org/doc/glossary.html#lockfile 3 | packages: 4 | analyzer: 5 | description: 6 | name: analyzer 7 | url: "http://pub.drafintech.it:5001" 8 | source: hosted 9 | version: "0.30.0+2" 10 | archive: 11 | description: 12 | name: archive 13 | url: "http://pub.drafintech.it:5001" 14 | source: hosted 15 | version: "1.0.29" 16 | args: 17 | description: 18 | name: args 19 | url: "http://pub.drafintech.it:5001" 20 | source: hosted 21 | version: "0.13.7" 22 | async: 23 | description: 24 | name: async 25 | url: "http://pub.drafintech.it:5001" 26 | source: hosted 27 | version: "1.13.3" 28 | barback: 29 | description: 30 | name: barback 31 | url: "http://pub.drafintech.it:5001" 32 | source: hosted 33 | version: "0.15.2+11" 34 | bazel_worker: 35 | description: 36 | name: bazel_worker 37 | url: "http://pub.drafintech.it:5001" 38 | source: hosted 39 | version: "0.1.4" 40 | built_collection: 41 | description: 42 | name: built_collection 43 | url: "http://pub.drafintech.it:5001" 44 | source: hosted 45 | version: "1.4.0" 46 | charcode: 47 | description: 48 | name: charcode 49 | url: "http://pub.drafintech.it:5001" 50 | source: hosted 51 | version: "1.1.1" 52 | cli_util: 53 | description: 54 | name: cli_util 55 | url: "http://pub.drafintech.it:5001" 56 | source: hosted 57 | version: "0.1.1" 58 | code_builder: 59 | description: 60 | name: code_builder 61 | url: "http://pub.drafintech.it:5001" 62 | source: hosted 63 | version: "1.0.3" 64 | code_transformers: 65 | description: 66 | name: code_transformers 67 | url: "http://pub.drafintech.it:5001" 68 | source: hosted 69 | version: "0.5.1+3" 70 | collection: 71 | description: 72 | name: collection 73 | url: "http://pub.drafintech.it:5001" 74 | source: hosted 75 | version: "1.14.1" 76 | convert: 77 | description: 78 | name: convert 79 | url: "http://pub.drafintech.it:5001" 80 | source: hosted 81 | version: "2.0.1" 82 | crypto: 83 | description: 84 | name: crypto 85 | url: "http://pub.drafintech.it:5001" 86 | source: hosted 87 | version: "2.0.1" 88 | csslib: 89 | description: 90 | name: csslib 91 | url: "http://pub.drafintech.it:5001" 92 | source: hosted 93 | version: "0.14.0" 94 | dart_style: 95 | description: 96 | name: dart_style 97 | url: "http://pub.drafintech.it:5001" 98 | source: hosted 99 | version: "1.0.6" 100 | fixnum: 101 | description: 102 | name: fixnum 103 | url: "http://pub.drafintech.it:5001" 104 | source: hosted 105 | version: "0.10.5" 106 | front_end: 107 | description: 108 | name: front_end 109 | url: "http://pub.drafintech.it:5001" 110 | source: hosted 111 | version: "0.1.0-alpha.4" 112 | func: 113 | description: 114 | name: func 115 | url: "http://pub.drafintech.it:5001" 116 | source: hosted 117 | version: "1.0.0" 118 | glob: 119 | description: 120 | name: glob 121 | url: "http://pub.drafintech.it:5001" 122 | source: hosted 123 | version: "1.1.3" 124 | homedir: 125 | description: 126 | name: homedir 127 | url: "http://pub.drafintech.it:5001" 128 | source: hosted 129 | version: "0.0.4" 130 | html: 131 | description: 132 | name: html 133 | url: "http://pub.drafintech.it:5001" 134 | source: hosted 135 | version: "0.13.2" 136 | html5: 137 | description: 138 | path: "../../html_lib" 139 | relative: true 140 | source: path 141 | version: "0.0.7" 142 | http: 143 | description: 144 | name: http 145 | url: "http://pub.drafintech.it:5001" 146 | source: hosted 147 | version: "0.11.3+13" 148 | http_parser: 149 | description: 150 | name: http_parser 151 | url: "http://pub.drafintech.it:5001" 152 | source: hosted 153 | version: "3.1.1" 154 | intl: 155 | description: 156 | name: intl 157 | url: "http://pub.drafintech.it:5001" 158 | source: hosted 159 | version: "0.15.0" 160 | isolate: 161 | description: 162 | name: isolate 163 | url: "http://pub.drafintech.it:5001" 164 | source: hosted 165 | version: "1.0.0" 166 | js: 167 | description: 168 | name: js 169 | url: "http://pub.drafintech.it:5001" 170 | source: hosted 171 | version: "0.6.1" 172 | kernel: 173 | description: 174 | name: kernel 175 | url: "http://pub.drafintech.it:5001" 176 | source: hosted 177 | version: "0.3.0-alpha.1" 178 | logging: 179 | description: 180 | name: logging 181 | url: "http://pub.drafintech.it:5001" 182 | source: hosted 183 | version: "0.11.3+1" 184 | logging_handlers: 185 | description: 186 | name: logging_handlers 187 | url: "http://pub.drafintech.it:5001" 188 | source: hosted 189 | version: "0.8.0" 190 | matcher: 191 | description: 192 | name: matcher 193 | url: "http://pub.drafintech.it:5001" 194 | source: hosted 195 | version: "0.12.1+1" 196 | meta: 197 | description: 198 | name: meta 199 | url: "http://pub.drafintech.it:5001" 200 | source: hosted 201 | version: "1.0.5" 202 | package_config: 203 | description: 204 | name: package_config 205 | url: "http://pub.drafintech.it:5001" 206 | source: hosted 207 | version: "1.0.1" 208 | package_resolver: 209 | description: 210 | name: package_resolver 211 | url: "http://pub.drafintech.it:5001" 212 | source: hosted 213 | version: "1.0.2" 214 | path: 215 | description: 216 | name: path 217 | url: "http://pub.drafintech.it:5001" 218 | source: hosted 219 | version: "1.4.1" 220 | plugin: 221 | description: 222 | name: plugin 223 | url: "http://pub.drafintech.it:5001" 224 | source: hosted 225 | version: "0.2.0" 226 | polymer_element: 227 | description: 228 | path: "../../polymer_element" 229 | relative: true 230 | source: path 231 | version: "2.0.0+rc.13" 232 | polymer_elements: 233 | description: 234 | ref: "v0.3.4" 235 | resolved-ref: b7305d2889adb93755626df07a02ebc98e36966b 236 | url: "https://github.com/polymer-dart/polymerize_elements.git" 237 | source: git 238 | version: "2.0.0-preview.1+1" 239 | polymerize: 240 | description: 241 | path: "../../polymerize" 242 | relative: true 243 | source: path 244 | version: "0.8.5" 245 | polymerize_common: 246 | description: 247 | path: "../../polymerize_common" 248 | relative: true 249 | source: path 250 | version: "1.0.0" 251 | pool: 252 | description: 253 | name: pool 254 | url: "http://pub.drafintech.it:5001" 255 | source: hosted 256 | version: "1.3.1" 257 | protobuf: 258 | description: 259 | name: protobuf 260 | url: "http://pub.drafintech.it:5001" 261 | source: hosted 262 | version: "0.5.4" 263 | quiver: 264 | description: 265 | name: quiver 266 | url: "http://pub.drafintech.it:5001" 267 | source: hosted 268 | version: "0.25.0" 269 | resource: 270 | description: 271 | name: resource 272 | url: "http://pub.drafintech.it:5001" 273 | source: hosted 274 | version: "2.1.2" 275 | source_maps: 276 | description: 277 | name: source_maps 278 | url: "http://pub.drafintech.it:5001" 279 | source: hosted 280 | version: "0.10.4" 281 | source_span: 282 | description: 283 | name: source_span 284 | url: "http://pub.drafintech.it:5001" 285 | source: hosted 286 | version: "1.4.0" 287 | stack_trace: 288 | description: 289 | name: stack_trace 290 | url: "http://pub.drafintech.it:5001" 291 | source: hosted 292 | version: "1.7.3" 293 | string_scanner: 294 | description: 295 | name: string_scanner 296 | url: "http://pub.drafintech.it:5001" 297 | source: hosted 298 | version: "1.0.2" 299 | todo_common: 300 | description: 301 | path: "../todo_common" 302 | relative: true 303 | source: path 304 | version: "0.0.1" 305 | todo_renderer: 306 | description: 307 | path: "../todo_renderer" 308 | relative: true 309 | source: path 310 | version: "0.0.1" 311 | typed_data: 312 | description: 313 | name: typed_data 314 | url: "http://pub.drafintech.it:5001" 315 | source: hosted 316 | version: "1.1.3" 317 | utf: 318 | description: 319 | name: utf 320 | url: "http://pub.drafintech.it:5001" 321 | source: hosted 322 | version: "0.9.0+3" 323 | watcher: 324 | description: 325 | name: watcher 326 | url: "http://pub.drafintech.it:5001" 327 | source: hosted 328 | version: "0.9.7+3" 329 | yaml: 330 | description: 331 | name: yaml 332 | url: "http://pub.drafintech.it:5001" 333 | source: hosted 334 | version: "2.1.12" 335 | sdks: 336 | dart: ">=1.23.0-dev.0.0 <2.0.0" 337 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See http://pub.dartlang.org/doc/glossary.html#lockfile 3 | packages: 4 | analyzer: 5 | description: 6 | name: analyzer 7 | url: "http://pub.drafintech.it:5001" 8 | source: hosted 9 | version: "0.30.0+2" 10 | archive: 11 | description: 12 | name: archive 13 | url: "http://pub.drafintech.it:5001" 14 | source: hosted 15 | version: "1.0.31" 16 | args: 17 | description: 18 | name: args 19 | url: "http://pub.drafintech.it:5001" 20 | source: hosted 21 | version: "0.13.7" 22 | async: 23 | description: 24 | name: async 25 | url: "http://pub.drafintech.it:5001" 26 | source: hosted 27 | version: "1.13.3" 28 | barback: 29 | description: 30 | name: barback 31 | url: "http://pub.drafintech.it:5001" 32 | source: hosted 33 | version: "0.15.2+11" 34 | bazel_worker: 35 | description: 36 | name: bazel_worker 37 | url: "http://pub.drafintech.it:5001" 38 | source: hosted 39 | version: "0.1.4" 40 | boolean_selector: 41 | description: 42 | name: boolean_selector 43 | url: "http://pub.drafintech.it:5001" 44 | source: hosted 45 | version: "1.0.2" 46 | build: 47 | description: 48 | name: build 49 | url: "http://pub.drafintech.it:5001" 50 | source: hosted 51 | version: "0.10.0+1" 52 | build_barback: 53 | description: 54 | name: build_barback 55 | url: "http://pub.drafintech.it:5001" 56 | source: hosted 57 | version: "0.4.0" 58 | build_runner: 59 | description: 60 | name: build_runner 61 | url: "http://pub.drafintech.it:5001" 62 | source: hosted 63 | version: "0.4.0+3" 64 | built_collection: 65 | description: 66 | name: built_collection 67 | url: "http://pub.drafintech.it:5001" 68 | source: hosted 69 | version: "1.5.0" 70 | charcode: 71 | description: 72 | name: charcode 73 | url: "http://pub.drafintech.it:5001" 74 | source: hosted 75 | version: "1.1.1" 76 | cli_util: 77 | description: 78 | name: cli_util 79 | url: "http://pub.drafintech.it:5001" 80 | source: hosted 81 | version: "0.1.2" 82 | code_builder: 83 | description: 84 | name: code_builder 85 | url: "http://pub.drafintech.it:5001" 86 | source: hosted 87 | version: "1.0.4" 88 | code_transformers: 89 | description: 90 | name: code_transformers 91 | url: "http://pub.drafintech.it:5001" 92 | source: hosted 93 | version: "0.5.1+3" 94 | collection: 95 | description: 96 | name: collection 97 | url: "http://pub.drafintech.it:5001" 98 | source: hosted 99 | version: "1.14.3" 100 | convert: 101 | description: 102 | name: convert 103 | url: "http://pub.drafintech.it:5001" 104 | source: hosted 105 | version: "2.0.1" 106 | crypto: 107 | description: 108 | name: crypto 109 | url: "http://pub.drafintech.it:5001" 110 | source: hosted 111 | version: "2.0.2" 112 | csslib: 113 | description: 114 | name: csslib 115 | url: "http://pub.drafintech.it:5001" 116 | source: hosted 117 | version: "0.14.0" 118 | dart_style: 119 | description: 120 | name: dart_style 121 | url: "http://pub.drafintech.it:5001" 122 | source: hosted 123 | version: "1.0.7" 124 | fixnum: 125 | description: 126 | name: fixnum 127 | url: "http://pub.drafintech.it:5001" 128 | source: hosted 129 | version: "0.10.6" 130 | front_end: 131 | description: 132 | name: front_end 133 | url: "http://pub.drafintech.it:5001" 134 | source: hosted 135 | version: "0.1.0-alpha.4" 136 | func: 137 | description: 138 | name: func 139 | url: "http://pub.drafintech.it:5001" 140 | source: hosted 141 | version: "1.0.0" 142 | glob: 143 | description: 144 | name: glob 145 | url: "http://pub.drafintech.it:5001" 146 | source: hosted 147 | version: "1.1.3" 148 | homedir: 149 | description: 150 | name: homedir 151 | url: "http://pub.drafintech.it:5001" 152 | source: hosted 153 | version: "0.0.4" 154 | html: 155 | description: 156 | name: html 157 | url: "http://pub.drafintech.it:5001" 158 | source: hosted 159 | version: "0.13.2" 160 | html5: 161 | description: 162 | name: html5 163 | url: "http://pub.drafintech.it:5001" 164 | source: hosted 165 | version: "0.1.7" 166 | http: 167 | description: 168 | name: http 169 | url: "http://pub.drafintech.it:5001" 170 | source: hosted 171 | version: "0.11.3+14" 172 | http_multi_server: 173 | description: 174 | name: http_multi_server 175 | url: "http://pub.drafintech.it:5001" 176 | source: hosted 177 | version: "2.0.3" 178 | http_parser: 179 | description: 180 | name: http_parser 181 | url: "http://pub.drafintech.it:5001" 182 | source: hosted 183 | version: "3.1.1" 184 | intl: 185 | description: 186 | name: intl 187 | url: "http://pub.drafintech.it:5001" 188 | source: hosted 189 | version: "0.15.1" 190 | isolate: 191 | description: 192 | name: isolate 193 | url: "http://pub.drafintech.it:5001" 194 | source: hosted 195 | version: "1.0.0" 196 | js: 197 | description: 198 | name: js 199 | url: "http://pub.drafintech.it:5001" 200 | source: hosted 201 | version: "0.6.1" 202 | kernel: 203 | description: 204 | name: kernel 205 | url: "http://pub.drafintech.it:5001" 206 | source: hosted 207 | version: "0.3.0-alpha.1" 208 | logging: 209 | description: 210 | name: logging 211 | url: "http://pub.drafintech.it:5001" 212 | source: hosted 213 | version: "0.11.3+1" 214 | logging_handlers: 215 | description: 216 | name: logging_handlers 217 | url: "http://pub.drafintech.it:5001" 218 | source: hosted 219 | version: "0.8.0" 220 | matcher: 221 | description: 222 | name: matcher 223 | url: "http://pub.drafintech.it:5001" 224 | source: hosted 225 | version: "0.12.1+3" 226 | meta: 227 | description: 228 | name: meta 229 | url: "http://pub.drafintech.it:5001" 230 | source: hosted 231 | version: "1.1.1" 232 | mime: 233 | description: 234 | name: mime 235 | url: "http://pub.drafintech.it:5001" 236 | source: hosted 237 | version: "0.9.3" 238 | node_preamble: 239 | description: 240 | name: node_preamble 241 | url: "http://pub.drafintech.it:5001" 242 | source: hosted 243 | version: "1.4.0" 244 | package_config: 245 | description: 246 | name: package_config 247 | url: "http://pub.drafintech.it:5001" 248 | source: hosted 249 | version: "1.0.2" 250 | package_resolver: 251 | description: 252 | name: package_resolver 253 | url: "http://pub.drafintech.it:5001" 254 | source: hosted 255 | version: "1.0.2" 256 | path: 257 | description: 258 | name: path 259 | url: "http://pub.drafintech.it:5001" 260 | source: hosted 261 | version: "1.4.2" 262 | plugin: 263 | description: 264 | name: plugin 265 | url: "http://pub.drafintech.it:5001" 266 | source: hosted 267 | version: "0.2.0+1" 268 | polymer_element: 269 | description: 270 | name: polymer_element 271 | url: "http://pub.drafintech.it:5001" 272 | source: hosted 273 | version: "2.0.6" 274 | polymer_elements: 275 | description: 276 | ref: "v0.4.1" 277 | resolved-ref: "15691c701974609e07fbaedf8b214253019cd162" 278 | url: "https://github.com/polymer-dart/polymerize_elements.git" 279 | source: git 280 | version: "2.0.1" 281 | polymerize: 282 | description: 283 | name: polymerize 284 | url: "http://pub.drafintech.it:5001" 285 | source: hosted 286 | version: "0.9.6" 287 | polymerize_common: 288 | description: 289 | name: polymerize_common 290 | url: "http://pub.drafintech.it:5001" 291 | source: hosted 292 | version: "1.0.2" 293 | pool: 294 | description: 295 | name: pool 296 | url: "http://pub.drafintech.it:5001" 297 | source: hosted 298 | version: "1.3.1" 299 | protobuf: 300 | description: 301 | name: protobuf 302 | url: "http://pub.drafintech.it:5001" 303 | source: hosted 304 | version: "0.5.5" 305 | pub_semver: 306 | description: 307 | name: pub_semver 308 | url: "http://pub.drafintech.it:5001" 309 | source: hosted 310 | version: "1.3.2" 311 | quiver: 312 | description: 313 | name: quiver 314 | url: "http://pub.drafintech.it:5001" 315 | source: hosted 316 | version: "0.25.0" 317 | resource: 318 | description: 319 | name: resource 320 | url: "http://pub.drafintech.it:5001" 321 | source: hosted 322 | version: "2.1.2" 323 | shelf: 324 | description: 325 | name: shelf 326 | url: "http://pub.drafintech.it:5001" 327 | source: hosted 328 | version: "0.6.8" 329 | shelf_packages_handler: 330 | description: 331 | name: shelf_packages_handler 332 | url: "http://pub.drafintech.it:5001" 333 | source: hosted 334 | version: "1.0.2" 335 | shelf_static: 336 | description: 337 | name: shelf_static 338 | url: "http://pub.drafintech.it:5001" 339 | source: hosted 340 | version: "0.2.5" 341 | shelf_web_socket: 342 | description: 343 | name: shelf_web_socket 344 | url: "http://pub.drafintech.it:5001" 345 | source: hosted 346 | version: "0.2.1" 347 | source_gen: 348 | description: 349 | name: source_gen 350 | url: "http://pub.drafintech.it:5001" 351 | source: hosted 352 | version: "0.7.1" 353 | source_map_stack_trace: 354 | description: 355 | name: source_map_stack_trace 356 | url: "http://pub.drafintech.it:5001" 357 | source: hosted 358 | version: "1.1.4" 359 | source_maps: 360 | description: 361 | name: source_maps 362 | url: "http://pub.drafintech.it:5001" 363 | source: hosted 364 | version: "0.10.4" 365 | source_span: 366 | description: 367 | name: source_span 368 | url: "http://pub.drafintech.it:5001" 369 | source: hosted 370 | version: "1.4.0" 371 | stack_trace: 372 | description: 373 | name: stack_trace 374 | url: "http://pub.drafintech.it:5001" 375 | source: hosted 376 | version: "1.8.0" 377 | stream_channel: 378 | description: 379 | name: stream_channel 380 | url: "http://pub.drafintech.it:5001" 381 | source: hosted 382 | version: "1.6.1" 383 | stream_transform: 384 | description: 385 | name: stream_transform 386 | url: "http://pub.drafintech.it:5001" 387 | source: hosted 388 | version: "0.0.9" 389 | string_scanner: 390 | description: 391 | name: string_scanner 392 | url: "http://pub.drafintech.it:5001" 393 | source: hosted 394 | version: "1.0.2" 395 | term_glyph: 396 | description: 397 | name: term_glyph 398 | url: "http://pub.drafintech.it:5001" 399 | source: hosted 400 | version: "1.0.0" 401 | test: 402 | description: 403 | name: test 404 | url: "http://pub.drafintech.it:5001" 405 | source: hosted 406 | version: "0.12.24+2" 407 | todo_common: 408 | description: 409 | path: todo_common 410 | relative: true 411 | source: path 412 | version: "0.0.1" 413 | todo_main: 414 | description: 415 | path: todo_main 416 | relative: true 417 | source: path 418 | version: "0.0.1" 419 | todo_renderer: 420 | description: 421 | path: todo_renderer 422 | relative: true 423 | source: path 424 | version: "0.0.1" 425 | typed_data: 426 | description: 427 | name: typed_data 428 | url: "http://pub.drafintech.it:5001" 429 | source: hosted 430 | version: "1.1.4" 431 | utf: 432 | description: 433 | name: utf 434 | url: "http://pub.drafintech.it:5001" 435 | source: hosted 436 | version: "0.9.0+3" 437 | watcher: 438 | description: 439 | name: watcher 440 | url: "http://pub.drafintech.it:5001" 441 | source: hosted 442 | version: "0.9.7+3" 443 | web_socket_channel: 444 | description: 445 | name: web_socket_channel 446 | url: "http://pub.drafintech.it:5001" 447 | source: hosted 448 | version: "1.0.5" 449 | yaml: 450 | description: 451 | name: yaml 452 | url: "http://pub.drafintech.it:5001" 453 | source: hosted 454 | version: "2.1.12" 455 | sdks: 456 | dart: ">=1.24.0 <2.0.0-dev.infinity" 457 | --------------------------------------------------------------------------------