Add UpperCaseInput formatter
This commit is contained in:
parent
a149e661f5
commit
fecaeb797b
12
lib/extensions/input_formatter.dart
Normal file
12
lib/extensions/input_formatter.dart
Normal file
|
@ -0,0 +1,12 @@
|
|||
import "package:flutter/services.dart";
|
||||
|
||||
class UpperCaseTextFormatter extends TextInputFormatter {
|
||||
@override
|
||||
TextEditingValue formatEditUpdate(
|
||||
TextEditingValue oldValue, TextEditingValue newValue) {
|
||||
return TextEditingValue(
|
||||
text: newValue.text.toUpperCase(),
|
||||
selection: newValue.selection,
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue