How can I compare Lists for equality in Dart?
To complete Gunter’s answer: the recommended way to compare lists for equality (rather than identity) is by using the Equality classes from the following package import ‘package:collection/collection.dart’; Edit: prior to 1.13, it was import ‘package:collection/equality.dart’; E.g.: Function eq = const ListEquality().equals; print(eq([1,’two’,3], [1,’two’,3])); // => true The above prints true because the corresponding list elements … Read more