Skip to content

Commit

Permalink
fix fake annotations to comply with new freezed_annotations version
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameri11 committed Sep 29, 2024
1 parent ddedef3 commit c4cee18
Showing 1 changed file with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
// We could instead remove the annotations, but that would make the process of
// updating the generated files tedious.

import 'package:collection/collection.dart';

const nullable = Object();
const freezed = Object();
const useResult = Object();

class Default {
const Default(Object value);
Expand All @@ -22,5 +25,24 @@ class JsonKey {
const JsonKey({
bool? ignore,
Object? defaultValue,
bool? includeFromJson,
bool? includeToJson,
});
}

class EqualUnmodifiableListView<T> extends UnmodifiableListView<T> {
/// An [UnmodifiableListView] which overrides ==
EqualUnmodifiableListView(this._source) : super(_source);

final Iterable<T> _source;

@override
bool operator ==(Object other) {
return other is EqualUnmodifiableListView<T> &&
other.runtimeType == runtimeType &&
other._source == _source;
}

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

0 comments on commit c4cee18

Please sign in to comment.