isValidContact method

Future<bool> isValidContact({
  1. required String phone,
})

check if the given Phone number is a valid phone number

Implementation

Future<bool> isValidContact({required String phone}) async {
  await wpClient.evaluateJs(
    '''WPP.contact.queryExists(${phone.phoneParse});''',
    methodName: "isValidContact",
  );
  // return true by default , it will crash on any issue
  return true;
}