I'm using Freezed for dart immutable data modelling. This generator is overwriting ==
operator and the hasCode
, which is fine for 99% of cases.
But I have a special case where comparing a long list take time and the List is managed internally. Because access from outside is not possible and I can guarantee that list is not updated, I can compare the instance itself instead of the content.
So the question is, how to check if two objects are the same instance?
If there is no way because overwriting the ==
operator and the hasCode
method, is possible to disable the generation of both in this case, but still generate other code?
Note: There is a similar question here, but I want to continue using Freezed.