Skip to content

Commit 3d1cbce

Browse files
authored
Revert PropertyChangeMixin (#14)
1 parent d296efa commit 3d1cbce

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.17.0+1
2+
3+
* Revert `PropertyChangeMixin`, which does not work in dart2js
4+
15
## 0.17.0
26

37
This is a larger change with a goal of no runtime changes for current

lib/src/change_notifier.dart

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,15 @@ class ChangeNotifier<C extends ChangeRecord> implements Observable<C> {
105105
}
106106
}
107107

108-
/// Implements [notifyPropertyChange] for classes that need support.
108+
/// Supplies property `changes` and various hooks to implement [Observable].
109+
///
110+
/// May use `notifyChange` or `notifyPropertyChange` to queue a property change
111+
/// record; they are asynchronously delivered at the end of the VM turn.
109112
///
110-
/// Will be folded entirely into [PropertyChangeNotifier] in the future.
111-
@Deprecated('Exists to make migrations off Observable easier')
112-
abstract class PropertyChangeMixin implements ChangeNotifier {
113+
/// [PropertyChangeNotifier] may be extended or used as a delegate. To use as
114+
/// a mixin, instead use with [PropertyChangeMixin]:
115+
/// with ChangeNotifier<PropertyChangeRecord>, PropertyChangeMixin
116+
class PropertyChangeNotifier extends ChangeNotifier<PropertyChangeRecord> {
113117
@override
114118
/*=T*/ notifyPropertyChange/*<T>*/(
115119
Symbol field,
@@ -131,14 +135,3 @@ abstract class PropertyChangeMixin implements ChangeNotifier {
131135
return newValue;
132136
}
133137
}
134-
135-
/// Supplies property `changes` and various hooks to implement [Observable].
136-
///
137-
/// May use `notifyChange` or `notifyPropertyChange` to queue a property change
138-
/// record; they are asynchronously delivered at the end of the VM turn.
139-
///
140-
/// [PropertyChangeNotifier] may be extended or used as a delegate. To use as
141-
/// a mixin, instead use with [PropertyChangeMixin]:
142-
/// with ChangeNotifier<PropertyChangeRecord>, PropertyChangeMixin
143-
class PropertyChangeNotifier = ChangeNotifier<PropertyChangeRecord>
144-
with PropertyChangeMixin;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: observable
2-
version: 0.17.0
2+
version: 0.17.0+1
33
author: Dart Team <[email protected]>
44
description: Support for marking objects as observable
55
homepage: https://github.com/dart-lang/observable

0 commit comments

Comments
 (0)