phoneShort static method

String phoneShort(
  1. String phone
)

手机号缩略显示

Implementation

static String phoneShort(String phone) {
  if (phone.length == 11) {
    return '${phone.substring(0, 3)}*****${phone.substring(8, 11)}';
  }
  return '';
}