profilesGenerator top-level property

FigGenerator profilesGenerator
final

Implementation

final FigGenerator profilesGenerator = FigGenerator(
  script: ['aws-vault', 'list', '--profiles'],
  postProcess: (out, [tokens]) {
    // 明确知道 tokens 是可选的位置参数
    return out
        .split('\n')
        .where((line) => line.trim().isNotEmpty)
        .map((name) => FigSuggestion(name: name.trim()))
        .toList();
  },
);