Compact a string (replacing all whitespace with single spaces.)
String compact(String str) { return str.split(RegExp(r"\s+")).join(" "); }