matchesBoundaries method

bool matchesBoundaries(
  1. VersionBoundaries? boundaries
)

Return true if the sdk constraints are ignored

Implementation

bool matchesBoundaries(VersionBoundaries? boundaries) {
  if (boundaries == null) {
    return false;
  }
  if (ignoreSdkConstraints ?? false) {
    return true;
  }
  if (hasConstraintsOverride()) {
    if (minSdk != null) {
      if (boundaries.min == null) {
        return false;
      }
      if (!minSdk!.matches(boundaries.min!.value)) {
        return false;
      }
    }
    if (maxSdk != null) {
      if (boundaries.max == null) {
        return false;
      }
      if (!maxSdk!.matches(boundaries.max!.value)) {
        return false;
      }
    }
  } else if (boundaries.min?.value == _versionZero ||
      boundaries.max?.value == _versionZero) {
    return false;
  }

  return true;
}