cap property

String get cap

Capitalizes the first letter of the string.

Implementation

String get cap {
  if (isBlank) return "";
  final trimmed = trim();
  return trimmed[0].toUpperCase() + trimmed.substring(1);
}