isValidPhone static method

bool isValidPhone(
  1. String? phone, [
  2. RegExp? pattern
])

Implementation

static bool isValidPhone(String? phone, [RegExp? pattern]) {
  return phone != null &&
      phone.isNotEmpty &&
      (pattern ?? AuthPatterns.phone).hasMatch(phone);
}