Works on Android, iOS, Web, macOS, Windows and Linux
You can implement a custom TextInputFormatter
class UpperCaseTextFormatter extends TextInputFormatter {
@override
TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
return TextEditingValue(
text: newValue.text.toUpperCase(),
selection: newValue.selection,
);
}
}
Usage:
TextField(
inputFormatters: [
UpperCaseTextFormatter(),
]
)
Full example