titleCase property
String
get
titleCase
Returns the string in title case (each word starts with an uppercase letter).
Implementation
String get titleCase => isNullOrEmpty ? "" : this!.split(" ").map((word) => word.isEmpty ? "" : '${word[0].toUpperCase()}${word.substring(1).toLowerCase()}').join(" ");