isLocal property

bool isLocal

Return true if this is the default package, this is part of an embedder SDK, or if DartdocOptionContext.autoIncludeDependencies is true -- but only if the package was not excluded on the command line.


bool get isLocal {
  _isLocal ??= (
          // Document as local if this is the default package.
          packageMeta == packageGraph.packageMeta ||
              // Assume we want to document an embedded SDK as local if
              // it has libraries defined in the default package.
              // TODO(jcollins-g): Handle case where embedder SDKs can be
              // assembled from multiple locations?
              packageGraph.hasEmbedderSdk &&
                  packageMeta.isSdk &&
                  libraries.any((l) => _pathContext.isWithin(
                      (l.element.source.fullName))) ||
              // autoIncludeDependencies means everything is local.
              packageGraph.config.autoIncludeDependencies) &&
      // Regardless of the above rules, do not document as local if
      // we excluded this package by name.
  return _isLocal;