deleteContact method

  1. @override
Future<void> deleteContact(
  1. String id
)
override

Deletes a contact by ID.

id - The ID of the contact to delete.

Implementation

@override
Future<void> deleteContact(String id) async {
  try {
    await methodChannel.invokeMethod('deleteContact', {'id': id});
  } on PlatformException catch (e) {
    throw Exception('Failed to delete contact: ${e.message}');
  }
}