addContact method

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

Implementation

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