findProject static method

DartProject? findProject(
  1. String pathToSearchFrom, {
  2. bool search = true,
})

Looks for a pubspec.yaml and if found returns a DartProject.

If search is true then it will search from pathToSearchFrom up the tree.

Implementation

static DartProject? findProject(String pathToSearchFrom,
    {bool search = true}) {
  final path = _findProject(pathToSearchFrom, search: search);

  return path == null ? null : DartProject.fromPath(path);
}