AYM1607 / do_more

A good looking glorified todo list built with flutter.
MIT License
29 stars 15 forks source link

Try to use Equatable for the user models #2

Open AYM1607 opened 5 years ago

AYM1607 commented 5 years ago

The models use named constructors and the code necessary to make it work with Equatable is too verbose and unnecessary. This is because the call to the super constructor (Equatable) complains when accessing non static members.

sticking to overriding hashCode and the == operator for now.

AYM1607 commented 5 years ago

overriding the operators seemed like a good idea. However, some models have attributes of non primitive types, this causes the equality check to fail even with the overrode operators.

Would be helpful to find out if equatable handles this situations well.

If it does, the best option is to move to it even if the code is a little more verbose.