toTrainCase property
String
get
toTrainCase
Converts the string to Train-Case (HTTP-Header-Case). Example: "helloWorld" => "Hello-World"
Implementation
String get toTrainCase =>
toWords.map((word) => word.capitalizeFirstLowerRest).join('-');