run method

Future<void> run()

Implementation

Future<void> run() async {
  while (true) {
    final features = _getFeatures();
    Console.printFeatureList(features);   // panel — printed once, stays

    final options = [
      ...features.map((f) => '📁  $f'),
      '➕  Add new feature',
      '🚪  Exit',
    ];

    final idx = _select('Feature Manager', options);  // menu follows immediately

    if (idx == options.length - 1) {
      Console.info('Goodbye! Happy coding 🚀');
      break;
    } else if (idx == options.length - 2) {
      await _addFeature();
    } else {
      await _manageFeature(features[idx]);
    }
  }
}