toKebabCase method

String toKebabCase()

Converts the string to kebab-case.

Example:

'helloWorld'.toKebabCase(); // 'hello-world'

Implementation

String toKebabCase() =>
    words().map((String word) => word.toLowerCase()).join('-');