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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 @reflectable |
76 class NotifyModel extends ChangeNotifierBase { | 76 class NotifyModel extends ChangeNotifier { |
77 var _x; | 77 var _x; |
78 NotifyModel([this._x]); | 78 NotifyModel([this._x]); |
79 | 79 |
80 get x => _x; | 80 get x => _x; |
81 set x(value) { | 81 set x(value) { |
82 _x = notifyPropertyChange(const Symbol('x'), _x, value); | 82 _x = notifyPropertyChange(const Symbol('x'), _x, value); |
83 } | 83 } |
84 } | 84 } |
OLD | NEW |