isIdCard static method

bool isIdCard(
  1. String value
)

验证身份证

Implementation

static bool isIdCard(String value) {
  return RegExp(r"\d{17}[\d|x]|\d{15}").hasMatch(value);
}