isPhone static method

bool isPhone(
  1. String str
)

判断是否为手机号格式 Check if it is phone number format

Implementation

static bool isPhone(String str) {
  return RegExp(r"^1[3-9]\d{9}$").hasMatch(str);
}