diff --git a/CHANGELOG.md b/CHANGELOG.md index 42084c70..f984e88a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# 8.9.1 + +- Fix for new warning about `operator==` param type. + # 8.9.0 - In `StandardJsonPlugin`, add support for specifying types that should be left diff --git a/built_value/lib/json_object.dart b/built_value/lib/json_object.dart index e8a42c9c..c6124b86 100644 --- a/built_value/lib/json_object.dart +++ b/built_value/lib/json_object.dart @@ -97,7 +97,7 @@ class BoolJsonObject extends JsonObject { bool get asBool => value; @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (identical(other, this)) return true; if (other is! BoolJsonObject) return false; return value == other.value; @@ -123,7 +123,7 @@ class ListJsonObject extends JsonObject { List get asList => value; @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (identical(other, this)) return true; if (other is! ListJsonObject) return false; return const DeepCollectionEquality().equals(value, other.value); @@ -149,7 +149,7 @@ class MapJsonObject extends JsonObject { Map get asMap => value; @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (identical(other, this)) return true; if (other is! MapJsonObject) return false; return const DeepCollectionEquality().equals(value, other.value); @@ -173,7 +173,7 @@ class NumJsonObject extends JsonObject { num get asNum => value; @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (identical(other, this)) return true; if (other is! NumJsonObject) return false; return value == other.value; @@ -197,7 +197,7 @@ class StringJsonObject extends JsonObject { String get asString => value; @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (identical(other, this)) return true; if (other is! StringJsonObject) return false; return value == other.value; diff --git a/built_value/lib/serializer.dart b/built_value/lib/serializer.dart index c2e0f62e..41e56ae1 100644 --- a/built_value/lib/serializer.dart +++ b/built_value/lib/serializer.dart @@ -269,7 +269,7 @@ class FullType { : FullType(root, parameters); @override - bool operator ==(dynamic other) { + bool operator ==(Object other) { if (identical(other, this)) return true; if (other is! FullType) return false; if (root != other.root) return false;