Future<String> getPubspecContents() { final file = File('pubspec.yaml'); if (!file.existsSync()) { throw StateError('pubspec.yaml does not exist'); } return file.readAsString(); }