isEqualToUnordered method

bool isEqualToUnordered(
  1. List<T> other
)

Returns true if this list is equal to other when order of elements does not matter.

Example usage:

void main() {
  List<int> list1 = [1, 2, 3];
  List<int> list2 = [3, 2, 1];
  bool areEqual = list1.isEqualToUnordered(list2);
  print(areEqual); // Output: true
}

Implementation

bool isEqualToUnordered(List<T> other) => const DeepCollectionEquality.unordered().equals(this, other);