getPackageName function
Implementation
String getPackageName() {
final file = File('pubspec.yaml');
if (!file.existsSync()) {
throw Exception('pubspec.yaml file not found');
}
final content = file.readAsStringSync();
var doc = loadYaml(content);
return doc['name'];
}