toCapitalized method

String toCapitalized()

Only capitalize first letter of this string

Implementation

String toCapitalized() =>
    isNotEmpty ? '${this[0].toUpperCase()}${substring(1).toLowerCase()}' : '';