fix(auth): hide codes reg ex, match every non-whitespace character

This commit is contained in:
Prateek Sunal 2024-05-22 14:08:09 +05:30
parent 59c2c7e343
commit 9ab82621b9

View file

@ -587,7 +587,7 @@ class _CodeWidgetState extends State<CodeWidget> {
String _getFormattedCode(String code) { String _getFormattedCode(String code) {
if (_hideCode) { if (_hideCode) {
// replace all digits with // replace all digits with
code = code.replaceAll(RegExp(r'\d'), ''); code = code.replaceAll(RegExp(r'\S'), '');
} }
if (code.length == 6) { if (code.length == 6) {
return "${code.substring(0, 3)} ${code.substring(3, 6)}"; return "${code.substring(0, 3)} ${code.substring(3, 6)}";