hasPubspec property

bool get hasPubspec

Returns true if pubspec.yaml exists and contains a valid project (has name).

Implementation

static bool get hasPubspec {
  final file = File('pubspec.yaml');
  return file.existsSync();
}