twoListIsEqual static method

bool twoListIsEqual(
  1. List? listA,
  2. List? listB
)

Returns true Two List Is Equal.

Implementation

static bool twoListIsEqual(List? listA, List? listB) {
  if (listA == listB) return true;
  if (listA == null || listB == null) return false;
  int length = listA.length;
  if (length != listB.length) return false;
  for (int i = 0; i < length; i++) {
    if (!listA.contains(listB[i])) {
      return false;
    }
  }
  return true;
}