deleteCallLog method

  1. @override
Future<void> deleteCallLog(
  1. List<String> jidlist,
  2. bool isClearAll,
  3. dynamic callback(
    1. FlyResponse response
    )?
)
override

This method is used to delete the call log from the list.

Implementation

@override
Future<void> deleteCallLog(List<String> jidlist, bool isClearAll,
    Function(FlyResponse response)? callback) async {
  bool? re;
  try {
    re = await mirrorFlyCallMethodChannel.invokeMethod<bool>(
        "deleteCallLog", {"jidList": jidlist, "isClearAll": isClearAll});
    LogMessage.d('deleteCallLog ', '$re');
    callback?.call(FlyResponse(true, FlyConstants.empty, FlyConstants.empty));
    // return re ?? false;
  } on PlatformException catch (e) {
    LogMessage.d("Platform Exception =", " $e");
    callback?.call(FlyResponse(false, FlyConstants.empty, FlyConstants.empty,
        FlyException(e.code, e.message, e.details)));
  } on Exception catch (e) {
    LogMessage.d("Exception ", " $e");
    callback?.call(FlyResponse(false, FlyConstants.empty, FlyConstants.empty,
        FlyException(FlyErrorCode.unHandle, FlyErrorMessage.unHandle, e)));
  }
}