Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Unified Diff: lib/src/list_path_observer.dart

Issue 1616953004: Fixed strong mode errors and warnings reachable from lib/observe.dart (Closed) Base URL: https://github.com/dart-lang/observe.git@master
Patch Set: Add analysis_options file Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/list_diff.dart ('k') | lib/src/metadata.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(_) {
« no previous file with comments | « lib/src/list_diff.dart ('k') | lib/src/metadata.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698