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]);
    }
  }
}