normalize static method
Normalize string for consistent ID generation
Implementation
static String normalize(String input) {
return input
.toLowerCase()
.trim()
.replaceAll(RegExp(r'\s+'), '-')
.replaceAll(RegExp(r'[^\w\-]'), '')
.replaceAll(RegExp(r'-+'), '-')
.replaceAll(RegExp(r'^-|-$'), '');
}