Skip to content

Commit

Permalink
better usage of null aware operator
Browse files Browse the repository at this point in the history
  • Loading branch information
kranfix committed Jun 14, 2021
1 parent ff2d7b3 commit f401a5b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
4 changes: 1 addition & 3 deletions lib/get_rx/src/rx_types/rx_core/rx_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ mixin RxObjectMixin<T> on NotifyManager<T> {

/// Returns the current [value]
T get value {
if (RxInterface.proxy != null) {
RxInterface.proxy!.addListener(subject);
}
RxInterface.proxy?.addListener(subject);
return _value;
}

Expand Down
4 changes: 1 addition & 3 deletions lib/get_rx/src/rx_types/rx_iterables/rx_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ class RxList<E> extends ListMixin<E>
@override
@protected
List<E> get value {
if (RxInterface.proxy != null) {
RxInterface.proxy!.addListener(subject);
}
RxInterface.proxy?.addListener(subject);
return _value;
}

Expand Down
4 changes: 1 addition & 3 deletions lib/get_rx/src/rx_types/rx_iterables/rx_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ class RxMap<K, V> extends MapMixin<K, V>
@override
@protected
Map<K, V> get value {
if (RxInterface.proxy != null) {
RxInterface.proxy!.addListener(subject);
}
RxInterface.proxy?.addListener(subject);
return _value;
}
}
Expand Down
4 changes: 1 addition & 3 deletions lib/get_rx/src/rx_types/rx_iterables/rx_set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ class RxSet<E> extends SetMixin<E>
@override
@protected
Set<E> get value {
if (RxInterface.proxy != null) {
RxInterface.proxy!.addListener(subject);
}
RxInterface.proxy?.addListener(subject);
return _value;
}

Expand Down

0 comments on commit f401a5b

Please sign in to comment.