I have following problem. There are two Lists with Articles in it. In the following example the result prints me false. But the Articles are the same. I think thats, because these are different objects, if I add in both lists article1, it will be true.
I also tried DeepCollectionEquality.unordered().equals from this issue: How can I compare Lists for equality in Dart?
But it is also giving me FALSE back. In my real project, I have two Lists with Articles in it. These lists are not sorted, so one Article can be the first in one list, and an article with the same id and name can be the last one in the other list. But if both lists have the same articles (with the same name and id) it should result with true.
var a = List<Article>();
var b = List<Article>();
var article1 = Article(id: "1", name: "Beer");
var article2 = Article(id: "1", name: "Beer");
a.add(article1);
b.add(article2);
print(listEquals(a, b));