isPhoneNumber static method

bool isPhoneNumber(
  1. String text
)

Tests whether text is a valid phone number.

Implementation

static bool isPhoneNumber(String text) {
  var rc = false;
  if (text.isNotEmpty) {
    rc = regExprPhoneNumber.firstMatch(text) != null;
  }
  return rc;
}