toTitleCase method

String? toTitleCase()

Capitalizes all words

Implementation

String? toTitleCase() {
  if (this == null) {
    return null;
  }
  return this!.split(' ').map((s) => s.toCapitalize()).join(' ');
}