runInteractive method

  1. @override
Future<void> runInteractive()
override

Entry point for interactive CLI execution.

Implementation

@override
Future<void> runInteractive() async {
  final fullPath = Input(
    prompt: 'Enter component path/name (e.g., home/widgets/user_card):',
    validator: (input) => input.isEmpty ? throw ValidationError('Path is required') : true,
  ).interact();

  final typeIndex = Select(
    prompt: 'Select component type:',
    options: ['async', 'sync'],
  ).interact();

  final types = ['async', 'sync'];
  await _execute(fullPath, types[typeIndex]);
}