capitalize method
Capitalize first letter and lowercase the rest.
Implementation
String capitalize() =>
isNotEmpty ? first.toUpperCase() + substring(1).toLowerCase() : this;
Capitalize first letter and lowercase the rest.
String capitalize() =>
isNotEmpty ? first.toUpperCase() + substring(1).toLowerCase() : this;