toKebabCase method
Converts this string to kebab-case.
'helloWorld'.toKebabCase(); // "hello-world"
'Hello World'.toKebabCase(); // "hello-world"
'hello_world'.toKebabCase(); // "hello-world"
Implementation
String toKebabCase() => _splitWords().map((w) => w.toLowerCase()).join('-');