arrayEquals static method

bool arrayEquals(
  1. List? a,
  2. List? b
)

Implementation

static bool arrayEquals(List<dynamic>? a, List<dynamic>? b) {
  if (a == null || b == null) {
    if (a == null && b == null) {
      return true;
    }
    return false;
  }
  if (a.runtimeType != b.runtimeType) {
    return false;
  }
  if (a.length != b.length) {
    return false;
  }

  for (int i = 0; i < a.length; i++) {
    if (a[i] is List) {
      if (!arrayEquals(a[i], b[i])) {
        return false;
      }
    } else if (a[i] != b[i]) {
      return false;
    }
  }

  return true;
}