titleCase property

String get titleCase

Title Case

Implementation

String get titleCase {
  final words = _splitToWords(_value.replaceAll('_', ' ').replaceAll('-', ' '));
  return words.map(_capitalizeFirstLetter).join(' ');
}
set titleCase (String s)

Implementation

set titleCase(String s) {
  final words = s.split(RegExp(r'\s+'));
  _value = words.map((word) => word.toLowerCase()).join('_');
}