getUserContactWithId function
Implementation
Future<Contact> getUserContactWithId(String id) async {
try {
final contactResponse = await _platform.getUserContactWithId(id);
if (contactResponse == null) {
throw Exception('Unable to get the contact.');
}
return Contact.fromJson(Map<String, dynamic>.from(json.decode(json.encode(contactResponse))));
} catch (error, stackTrace) {
Error.throwWithStackTrace(error, stackTrace);
}
}