addContact method

  1. @override
Future<bool?> addContact(
  1. String number,
  2. String name
)
override

This method is used to add the contact.

Implementation

@override
Future<bool?> addContact(String number, String name) async {
  bool? val = true;
  try {
    val = await mirrorFlyMethodChannel
        .invokeMethod('addContact', {'number': number, 'name': name});
    LogMessage.d('addContact', number);
    return val;
  } on PlatformException catch (e) {
    LogMessage.d("Platform Exception =", " $e");
    rethrow;
  } on Exception catch (error) {
    LogMessage.d("Exception ", " $error");
    rethrow;
  }
}