projectDirectory property

FutureOr<Directory> get projectDirectory

The resolved project Directory.

Implementation

FutureOr<Directory> get projectDirectory {
  var projDir = _projectDirectory;
  if (projDir == null) {
    if (_directory != null) {
      _projectDirectory = projDir = _directory!.absolute;
      log('INFO', 'Resolved `projectDirectory`: $projDir');
      return projDir;
    } else {
      return Isolate.current.packageMainDirectory.resolveMapped((dir) {
        _projectDirectory = dir;
        log('INFO', 'Resolved `projectDirectory`: $dir');
        return dir;
      });
    }
  } else {
    return projDir;
  }
}