refactor: Added some missing overrides and ignored a null warning
Showing
3 changed files
with
6 additions
and
4 deletions
@@ -504,6 +504,7 @@ class _CupertinoBackGestureDetectorState<T> | @@ -504,6 +504,7 @@ class _CupertinoBackGestureDetectorState<T> | ||
504 | } | 504 | } |
505 | // FIXME: shouldn't we return a default here? | 505 | // FIXME: shouldn't we return a default here? |
506 | // or perhaps throw error | 506 | // or perhaps throw error |
507 | + // ignore: avoid_returning_null | ||
507 | return null; | 508 | return null; |
508 | } | 509 | } |
509 | 510 |
@@ -28,7 +28,9 @@ class RxList<E> implements List<E>, RxInterface<List<E>> { | @@ -28,7 +28,9 @@ class RxList<E> implements List<E>, RxInterface<List<E>> { | ||
28 | @override | 28 | @override |
29 | bool get isNotEmpty => value.isNotEmpty; | 29 | bool get isNotEmpty => value.isNotEmpty; |
30 | 30 | ||
31 | - StreamController<List<E>> subject = StreamController<List<E>>.broadcast(); | 31 | + @override |
32 | + StreamController<List<E>> subject = StreamController.broadcast(); | ||
33 | + | ||
32 | final Map<Stream<List<E>>, StreamSubscription> _subscriptions = {}; | 34 | final Map<Stream<List<E>>, StreamSubscription> _subscriptions = {}; |
33 | 35 | ||
34 | void operator []=(int index, E val) { | 36 | void operator []=(int index, E val) { |
@@ -188,9 +190,7 @@ class RxList<E> implements List<E>, RxInterface<List<E>> { | @@ -188,9 +190,7 @@ class RxList<E> implements List<E>, RxInterface<List<E>> { | ||
188 | if (_subscriptions.containsKey(rxGetX)) { | 190 | if (_subscriptions.containsKey(rxGetX)) { |
189 | return; | 191 | return; |
190 | } | 192 | } |
191 | - _subscriptions[rxGetX] = rxGetX.listen((data) { | ||
192 | - subject.add(data); | ||
193 | - }); | 193 | + _subscriptions[rxGetX] = rxGetX.listen(subject.add); |
194 | } | 194 | } |
195 | 195 | ||
196 | set value(List<E> val) { | 196 | set value(List<E> val) { |
@@ -56,6 +56,7 @@ class RxSet<E> implements Set<E>, RxInterface<Set<E>> { | @@ -56,6 +56,7 @@ class RxSet<E> implements Set<E>, RxInterface<Set<E>> { | ||
56 | return val; | 56 | return val; |
57 | } | 57 | } |
58 | 58 | ||
59 | + @override | ||
59 | void addAll(Iterable<E> item) { | 60 | void addAll(Iterable<E> item) { |
60 | _set.addAll(item); | 61 | _set.addAll(item); |
61 | subject.add(_set); | 62 | subject.add(_set); |
-
Please register or login to post a comment