checkPhone static method

bool checkPhone(
  1. String value
)

Implementation

static bool checkPhone(String value) {
  String pattern = r'^[0-9]+$';
  RegExp regExp = RegExp(pattern);
  return regExp.hasMatch(value.replaceAll("+", ""));
}