flutter dart first letter uppercase code example
Example 1: dart char is uppercase
import 'dart:io';
main() {
print("Enter a string : ");
var str = stdin.readLineSync();
if (str[0].toUpperCase() == str[0]) {
print("The first character is uppercase");
} else {
print("The first character is not uppercase");
}
}
Example 2: flutter to capital letter
'alphabet'.toUpperCase(); // 'ALPHABET'
'ABC'.toUpperCase(); // 'ABC'