Skip to content

Commit

Permalink
add nonObservableInner, such that users can bypass observability sy…
Browse files Browse the repository at this point in the history
…stem for performance
  • Loading branch information
fzyzcjy committed Jul 12, 2022
1 parent 2e447ae commit 880ee28
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mobx/lib/src/api/observable_collections/observable_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class ObservableList<T>
final Atom _atom;
final List<T> _list;

List<T> get nonObservableInner => _list;

Listeners<ListChange<T>>? _listenersField;

Listeners<ListChange<T>> get _listeners =>
Expand Down
2 changes: 2 additions & 0 deletions mobx/lib/src/api/observable_collections/observable_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class ObservableMap<K, V>
final Atom _atom;
final Map<K, V> _map;

Map<K, V> get nonObservableInner => _map;

String get name => _atom.name;

Listeners<MapChange<K, V>>? _listenersField;
Expand Down
2 changes: 2 additions & 0 deletions mobx/lib/src/api/observable_collections/observable_set.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class ObservableSet<T>
final Atom _atom;
final Set<T> _set;

Set<T> get nonObservableInner => _set;

String get name => _atom.name;

Listeners<SetChange<T>>? _listenersField;
Expand Down

0 comments on commit 880ee28

Please sign in to comment.