With the below code, if we are entering 3 consecutive dots. those entered 2 dots got removed as well.
TextFormField(
autocorrect: false,
enableSuggestions: false,
inputFormatters: [
FilteringTextInputFormatter.allow(RegExp("[a-zA-Z0-9@,#.]")),
LengthLimitingTextInputFormatter(20)],
)
Example:
User entering input: Abc…
What Actually TextField shows in UI: Abc
Expected: Abc…
Note: Faced in iOS, Not tested in Android.