| 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 part of observe; | 5 part of observe; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Base class implementing [Observable] object that performs its own change | 8 * Base class implementing [Observable] object that performs its own change |
| 9 * notifications, and does not need to be considered by [Observable.dirtyCheck]. | 9 * notifications, and does not need to be considered by [Observable.dirtyCheck]. |
| 10 * | 10 * |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 * } | 78 * } |
| 79 */ | 79 */ |
| 80 notifyPropertyChange(Symbol field, Object oldValue, Object newValue) | 80 notifyPropertyChange(Symbol field, Object oldValue, Object newValue) |
| 81 => _notifyPropertyChange(this, field, oldValue, newValue); | 81 => _notifyPropertyChange(this, field, oldValue, newValue); |
| 82 | 82 |
| 83 void notifyChange(ChangeRecord record) { | 83 void notifyChange(ChangeRecord record) { |
| 84 if (!hasObservers) return; | 84 if (!hasObservers) return; |
| 85 | 85 |
| 86 if (_records == null) { | 86 if (_records == null) { |
| 87 _records = []; | 87 _records = []; |
| 88 runAsync(deliverChanges); | 88 scheduleMicrotask(deliverChanges); |
| 89 } | 89 } |
| 90 _records.add(record); | 90 _records.add(record); |
| 91 } | 91 } |
| 92 } | 92 } |
| OLD | NEW |