unslugify property

String get unslugify

Converts slug to string (e.g., "hello-world" → "Hello World")

Implementation

String get unslugify {
  if (this == null || this!.isEmpty) return "";
  return this!
      .replaceAll('-', ' ') // replace dashes with spaces
      .split(' ')           // split into words
      .map((word) => word.capitalize) // capitalize each
      .join(' ');
}