normalizeWhitespace method
Replace all white-space sequences with single space and trim.
Implementation
String normalizeWhitespace() => replaceAll(RegExp(r'(\s{2,})'), ' ').trim();
Replace all white-space sequences with single space and trim.
String normalizeWhitespace() => replaceAll(RegExp(r'(\s{2,})'), ' ').trim();