getPackageFile function

Future<File> getPackageFile (
  1. String path
)

Implementation

Future<File> getPackageFile(String path) async {
  final file = File(path);
  final fileExisted = await file.exists();

  if (!fileExisted) {
    print('No pubspec.yaml found in this dir');
    return null;
  }

  return file;
}