generate method

  1. @override
Future<void> generate(
  1. ProjectContext context
)
override

Executes the plugin's code-generation and configuration logic.

Implementation

@override
Future<void> generate(ProjectContext context) async {
  final pubspecPath = '${context.projectPath}/pubspec.yaml';

  // 1. Add BLoC dependencies
  Services.yamlService.addDependency(pubspecPath, 'flutter_bloc', '^8.1.6');
  Services.yamlService.addDependency(pubspecPath, 'bloc', '^8.1.4');
}