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