getPubspec method

  1. @override
File? getPubspec()
override

Returns the pubspec.yaml file if it exists.

Implementation

@override
File? getPubspec() {
  final pubspec = File('${root.path}/pubspec.yaml');
  if (pubspec.existsSync()) {
    return pubspec;
  }
  return null;
}