OLD | NEW |
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 bindings_test; | 5 library bindings_test; |
6 | 6 |
7 import 'dart:html'; | 7 import 'dart:html'; |
8 import 'package:mdv/mdv.dart' as mdv; | 8 import 'package:mdv/mdv.dart' as mdv; |
9 import 'package:observe/observe.dart'; | 9 import 'package:observe/observe.dart'; |
10 import 'package:observe/src/microtask.dart'; | 10 import 'package:observe/src/microtask.dart'; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // But propagating observable values through reassign the value and | 65 // But propagating observable values through reassign the value and |
66 // selection will be preserved. | 66 // selection will be preserved. |
67 expect(el.selectionStart, 4); | 67 expect(el.selectionStart, 4); |
68 expect(el.selectionEnd, 4); | 68 expect(el.selectionEnd, 4); |
69 | 69 |
70 subscription.cancel(); | 70 subscription.cancel(); |
71 })); | 71 })); |
72 }); | 72 }); |
73 } | 73 } |
74 | 74 |
| 75 @reflectable |
75 class NotifyModel extends ChangeNotifierBase { | 76 class NotifyModel extends ChangeNotifierBase { |
76 var _x; | 77 var _x; |
77 NotifyModel([this._x]); | 78 NotifyModel([this._x]); |
78 | 79 |
79 get x => _x; | 80 get x => _x; |
80 set x(value) { | 81 set x(value) { |
81 _x = notifyPropertyChange(const Symbol('x'), _x, value); | 82 _x = notifyPropertyChange(const Symbol('x'), _x, value); |
82 } | 83 } |
83 } | 84 } |
OLD | NEW |