toSlug property

String get toSlug

Converts the string to a URL-friendly slug.

Implementation

String get toSlug => trim().toLowerCase().replaceAll(' ', '-');