label property
String
get
label
Implementation
String get label {
final words = name.replaceAllMapped(
RegExp(r'[A-Z]'),
(m) => ' ${m.group(0)}',
);
return words
.trim()
.split(' ')
.map((w) => w.isEmpty ? w : '${w[0].toUpperCase()}${w.substring(1)}')
.join(' ');
}