keyProtectorsExtractValue static method
Implementation
static List<String> keyProtectorsExtractValue(String output) {
List<String> keyProtectors = [];
bool isParsing = false;
for (var line in output.split('\n')) {
// Remove leading and trailing whitespace
line = line.trim();
if (line == 'Key Protectors:') {
isParsing = true;
} else if (isParsing && line.isNotEmpty) {
keyProtectors.add(line);
} else if (isParsing && line.isEmpty) {
// Stop parsing once an empty line is encountered
break;
}
}
return keyProtectors;
}