lowerCaseFirstLetter static method

String lowerCaseFirstLetter(
  1. String text, {
  2. bool upperCaseRest = true,
})

Returns a String with first letter lower cased.

Implementation

static String lowerCaseFirstLetter(String text, {bool upperCaseRest = true}) {
  return '${text.substring(0, 1).toLowerCase()}${upperCaseRest ? text.substring(1).toUpperCase() : text.substring(1)}';
}