Pārlūkot izejas kodu

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

Prateek Sunal 1 gadu atpakaļ
vecāks
revīzija
9ab82621b9
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      auth/lib/ui/code_widget.dart

+ 1 - 1
auth/lib/ui/code_widget.dart

@@ -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)}";