Closed
Description
Right now FieldValue.delete()
returns values that don't equals()
. We should fix this to make unit testing mocks easier. The change should look something like this:
diff --git a/packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/method_channel/method_channel_field_value.dart b/packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/method_channel/method_channel_field_value.dart
index 0a598dfb..ed9d2b51 100644
--- a/packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/method_channel/method_channel_field_value.dart
+++ b/packages/cloud_firestore/cloud_firestore_platform_interface/lib/src/method_channel/method_channel_field_value.dart
@@ -32,4 +32,13 @@ class MethodChannelFieldValue extends FieldValuePlatform {
/// The value associated with the FieldValueType above.
final dynamic value;
+
+ @override
+ bool operator ==(dynamic other) =>
+ other is MethodChannelFieldValue &&
+ other.type == type &&
+ other.value == value;
+
+ @override
+ int get hashCode => hashList(type, value);
}