updateContact method
Updates an existing contact.
contact
- The contact data with updates.
Implementation
@override
Future<Contact> updateContact(Contact contact) async {
try {
final result = await methodChannel.invokeMethod<dynamic>(
'updateContact',
contact.toJson(),
);
return Contact.fromJson(_safeMapCast(result));
} on PlatformException catch (e) {
throw Exception('Failed to update contact: ${e.message}');
}
}