bool equals(ValueUpdate other)

Source

bool equals(ValueUpdate other) {
  if (value is Map) {
    // assume Map is same if it's generated at same timestamp
    if (other.value is! Map) {
      return false;
    }
  } else if (value is List) {
    // assume List is same if it's generated at same timestamp
    if (other.value is! List) {
      return false;
    }
  } else if (value != other.value) {
    return false;
  }

  if (other.ts != ts || other.count != count) {
    return false;
  }

  if (count == 1) {
    return true;
  }
  return other.sum == sum && other.min == min && other.max == max;
}