Skip to content
Open
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
12 changes: 6 additions & 6 deletions packages/freezed_annotation/lib/freezed_annotation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class EqualUnmodifiableListView<T> extends UnmodifiableListView<T> {
bool operator ==(Object other) {
return other is EqualUnmodifiableListView<T> &&
other.runtimeType == runtimeType &&
other._source == _source;
const DeepCollectionEquality().equals(other._source, _source);
}

@override
int get hashCode => Object.hash(runtimeType, _source);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_source));
}

/// An [UnmodifiableSetView] which overrides ==
Expand All @@ -36,11 +36,11 @@ class EqualUnmodifiableSetView<T> extends UnmodifiableSetView<T> {
bool operator ==(Object other) {
return other is EqualUnmodifiableSetView<T> &&
other.runtimeType == runtimeType &&
other._source == _source;
const DeepCollectionEquality().equals(other._source, _source);
}

@override
int get hashCode => Object.hash(runtimeType, _source);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_source));
}

/// An [UnmodifiableMapView] which overrides ==
Expand All @@ -55,11 +55,11 @@ class EqualUnmodifiableMapView<Key, Value>
bool operator ==(Object other) {
return other is EqualUnmodifiableMapView<Key, Value> &&
other.runtimeType == runtimeType &&
other._source == _source;
const DeepCollectionEquality().equals(other._source, _source);
}

@override
int get hashCode => Object.hash(runtimeType, _source);
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_source));
}

/// Options for enabling/disabling specific `Union.map` features;
Expand Down
Loading