isPhone function Null safety

bool isPhone(
  1. String input
)

Implementation

bool isPhone(String input) {
  return input.contains(RegExp("^[0-9\-\s\+\(\)]+\$")) &&
      input.replaceAll(RegExp("[^0-9]+"), "").length > 6;
}