Reputation: 121
So my TextFormField
is just showing 1 character when it is typed but when the character was deleted and retyped it didn't show anything, but the value was shown on the keyboard recommendations.
Heres my TextFormField
code:
Form(
key: _code,
child: TextFormField(
controller: codeController,
decoration: InputDecoration(
fillColor: Colors.transparent,
filled: true,
labelText: 'Kode Akses',
labelStyle: TextStyle(color: Colors.black),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(5.0)),
borderSide: BorderSide(color: Colors.black),
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide:BorderSide(color: Colors.black, width: 30.sp),
),
focusColor: Colors.red,
),
inputFormatters: [UpperCaseTextFormatter()],
),
),
Here I typed YOU
but it doesn't show anything in the TextFormField
.
As I discovered, the value isn't got inside the TextFormField
so,for anything I type, the value isn't fill in the TextFormField
.
Upvotes: 0
Views: 958
Reputation: 121
Remove inputFormatters: [UpperCaseTextFormatter()]
code, and change it to textCapitalization: TextCapitalization.characters
,
Upvotes: 1