checkPubspecExists method

Future<void> checkPubspecExists(
  1. String dir
)

Check if pubspec.yaml exists in the dir directory

Implementation

Future<void> checkPubspecExists(String dir) async {
  final pubspecFile = File(path.join(dir, 'pubspec.yaml'));

  if (!await pubspecFile.exists()) {
    throw PubspecNotFoundException(dir);
  }
}