hidePhone static method
Implementation
static String hidePhone(String phone, int num) {
final int length = phone.length;
final int replaceLength = length - num;
final String replacement =
List<String>.generate((replaceLength / 4).ceil(), (int _) => '***')
.join('');
return phone.replaceRange(0, replaceLength, replacement);
}