decapitalize method

String decapitalize({
  1. bool decapitalizeAll = false,
})

Decapitalizes the first character of the string

If decapitalizeAll is set to true, the whole string is converted to uppercase. It is set to false by default

Implementation

String decapitalize({bool decapitalizeAll = false}) {
  if (decapitalizeAll) {
    return this.lowerCase();
  } else {
    return this.isEmpty ? "" : this[0].lowerCase() + this.substring(1);
  }
}