Reputation: 679
I want to use '*' instead of '•' in text field.
TextField(
focusNode: _passwordFocusNode,
controller: _passwordController,
obscureText: true,
);
Upvotes: 8
Views: 9128
Reputation: 20241
Now flutter does support this feature for a textfield by setting the obscuringCharacter property, it takes a string strict to 1 character and the obscureText property should be true in order to take this effect
TextField(
obscuringCharacter: '&', // defaults to *
obscureText: true,
)
Upvotes: 7
Reputation: 1109
Flutter currently does not support this feature. Obscuring text is controlled by the property obscureText which takes a boolean expression. As you can see in the docs
When this is set to true, all the characters in the text field are replaced by U+2022 BULLET characters (•).
This issue on GitHub may be of help: https://github.com/flutter/flutter/issues/36377
Upvotes: 3