How can I force the TextFormField to only have uppercase letters ? textCapitalization: TextCapitalization.characters lets the user switch back to lowercase, so it isn't sufficient for what I want.
add textInputFormatter to text field
TextField(inputFormatters: [UpperCaseTextFormatter()]),
formatter class
class UpperCaseTextFormatter extends TextInputFormatter {
@override
TextEditingValue formatEditUpdate(TextEditingValue oldValue, TextEditingValue newValue) {
return TextEditingValue(text: newValue.text.toUpperCase(), selection: newValue.selection);
}
}