hideNumber static method

String hideNumber(
  1. String phoneNo, {
  2. int start = 3,
  3. int end = 7,
  4. String replacement = '****',
})

hideNumber

Implementation

static String hideNumber(String phoneNo,
    {int start = 3, int end = 7, String replacement = '****'}) {
  return phoneNo.replaceRange(start, end, replacement);
}