Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/src/async/observable_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,21 @@ class ObservableList<E> extends ListBase<E>
_list.length = value;
}

@override
bool operator ==(Object other) {
if (other is ObservableList<E>) {
return _list == other._list;
} else if (other is List<E>) {
return _list == other;
}
return false;
}

@override
int get hashCode {
return _list.hashCode;
}

@override
E operator [](int index) => _list[index];

Expand Down
15 changes: 15 additions & 0 deletions lib/src/async/observable_map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,21 @@ class ObservableMap<K, V>
@override
bool containsKey(Object? key) => _map.containsKey(key);

@override
bool operator ==(Object other) {
if (other is ObservableMap<K, V>) {
return _map == other._map;
} else if (other is Map<K, V>) {
return _map == other;
}
return false;
}

@override
int get hashCode {
return _map.hashCode;
}

@override
V? operator [](Object? key) => _map[key];

Expand Down
Loading