diff --git a/packages/provider_devtools_extension/lib/src/instance_viewer/fake_freezed_annotation.dart b/packages/provider_devtools_extension/lib/src/instance_viewer/fake_freezed_annotation.dart index e27aa470..70feeadc 100644 --- a/packages/provider_devtools_extension/lib/src/instance_viewer/fake_freezed_annotation.dart +++ b/packages/provider_devtools_extension/lib/src/instance_viewer/fake_freezed_annotation.dart @@ -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); @@ -22,5 +25,24 @@ class JsonKey { const JsonKey({ bool? ignore, Object? defaultValue, + bool? includeFromJson, + bool? includeToJson, }); } + +class EqualUnmodifiableListView extends UnmodifiableListView { + /// An [UnmodifiableListView] which overrides == + EqualUnmodifiableListView(this._source) : super(_source); + + final Iterable _source; + + @override + bool operator ==(Object other) { + return other is EqualUnmodifiableListView && + other.runtimeType == runtimeType && + other._source == _source; + } + + @override + int get hashCode => Object.hash(runtimeType, _source); +}