static String slug(String text) { return text .toLowerCase() .replaceAll(RegExp(r'[^a-z0-9\s-]'), '') .replaceAll(RegExp(r'\s+'), '-') .replaceAll(RegExp(r'-+'), '-') .trim(); }