fix(auth): hide codes reg ex, match every non-whitespace character
This commit is contained in:
parent
59c2c7e343
commit
9ab82621b9
|
@ -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)}";
|
||||||
|
|
Loading…
Reference in a new issue