Strip ANSI codes from text
static String stripAnsiCodes(String text) { return text.replaceAll(RegExp(r'\x1B\[[0-9;]*m'), ''); }