Open LukasPoque opened 3 years ago
Overriding ==
and hashcode is a bad idea on mutable objects like thing (https://dart-lang.github.io/linter/lints/avoid_equals_and_hash_code_on_mutable_classes.html).
If we decide to make things immutable we should use https://pub.dev/packages/equatable instead of overriding the normal comparison methods.
IMO we should make all data classes immutable. They should have a copyWith()
-Method to modify their attributes. This allows us to compare and use them in collections and other data structures where only immutable objects should be stored.
It should be easy to compare two things or sub-components (value, link, etc.). => Override
==
operator and hashcode.