getPubspecFile method

File? getPubspecFile()

Implementation

File? getPubspecFile() {
  var rootDirPath = _getRootDirectoryPath();
  var pubspecFilePath = join(rootDirPath, 'pubspec.yaml');
  var pubspecFile = File(pubspecFilePath);

  return pubspecFile.existsSync() ? pubspecFile : null;
}