Chromium Code Reviews| Index: lib/src/list_path_observer.dart |
| diff --git a/lib/src/list_path_observer.dart b/lib/src/list_path_observer.dart |
| index 22a81995989483ad5876c4e2328c05a4f44e3584..ac205e3d2740e017a45e539d60470a1351b4f245 100644 |
| --- a/lib/src/list_path_observer.dart |
| +++ b/lib/src/list_path_observer.dart |
| @@ -21,9 +21,7 @@ class ListPathObserver<E, P> extends ChangeNotifier { |
| bool _scheduled = false; |
| Iterable<P> _value; |
| - ListPathObserver(this.list, String path) |
| - : _itemPath = path { |
| - |
| + ListPathObserver(this.list, String path) : _itemPath = path { |
| // TODO(jmesserly): delay observation until we are observed. |
| _sub = list.listChanges.listen((records) { |
| for (var record in records) { |
| @@ -46,8 +44,8 @@ class ListPathObserver<E, P> extends ChangeNotifier { |
| void _reduce() { |
| _scheduled = false; |
| - var newValue = _observers.map((o) => o.value); |
| - _value = notifyPropertyChange(#value, _value, newValue); |
| + var newValue = _observers.map((o) => o.value as P); |
| + _value = notifyPropertyChange /*<Iterable<P>>*/ (#value, _value, newValue); |
|
Jennifer Messerly
2016/01/22 19:40:37
Hmmm. Both newValue and _value should be Iterable<
vsm
2016/01/22 20:35:16
Yes, removed the explicit type param.
|
| } |
| void _scheduleReduce(_) { |