how to make word text capital flutter code example
Example 1: dart capitalize first letter of each word
extension CapExtension on String {
String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}';
String get allInCaps => this.toUpperCase();
String get capitalizeFirstofEach => this.split(" ").map((str) => str.capitalize).join(" ");
}
final helloWorld = 'hello world'.inCaps;
final helloWorld = 'hello world'.allInCaps;
final helloWorld = 'hello world'.capitalizeFirstofEach;
Example 2: flutter to capital letter
'alphabet'.toUpperCase();
'ABC'.toUpperCase();