0

I am using freezed and I have list of object, I override my freezer class like this:

  @override
  bool operator ==(Object other) =>
      other is _ServiceItemModel &&
      id == other.id &&
      product.id == other.product.id &&
      product.externalId == other.product.externalId &&
      internalId == other.internalId &&
      identical(other, this);

  @override
  int get hashCode => [id, product.id, product.externalId, internalId].hashCode;

my question is why the value of bool iseq = identical(servicesItem, oldService ); return false !

servicesItem and oldService are List of ServiceItemModel.

Cyrus the Great
  • 5,145
  • 5
  • 68
  • 149

1 Answers1

0

you should remove this line

identical(other, this);
Ares
  • 2,504
  • 19
  • 19