felangel / equatable

A Dart package that helps to implement value based equality without needing to explicitly override == and hashCode.

Home Page:https://pub.dev/packages/equatable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with List<File> as property

DamnDaniel-98 opened this issue · comments

My class wich extends Equatable has a final List(File) property. When i pass this property to the probs getter of my class, it says that two equal Objects aren't equal. My workaround for this is to pass "files.map((e) => e.path).toList()," instead of just the files.

Hi @DamnDaniel-98 👋
Thanks for opening an issue!

I'm guessing this is because the contents of your list do not also extend Equatable. Please make sure that whatever type of object is in your list also extends Equatable and overrides props. If you're still having trouble please provide a minimal reproduction sample and I'm happy to take a look 👍