clearCallLog method

dynamic clearCallLog()

Implementation

clearCallLog() {
  DialogUtils.showAlert(
      dialogStyle: AppStyleConfig.dialogStyle,
      message: getTranslated("deleteAllCallLog"),
      actions: [
        TextButton(
            style: AppStyleConfig.dialogStyle.buttonStyle,
            onPressed: () {
              NavUtils.back();
            },
            child: Text(
              getTranslated("cancel").toUpperCase(),
            )),
        TextButton(
            style: AppStyleConfig.dialogStyle.buttonStyle,
            onPressed: () {
              NavUtils.back();
              Mirrorfly.deleteCallLog(
                  jidList: selectedCallLogs,
                  isClearAll: true,
                  flyCallBack: (FlyResponse response) {
                    if (!response.isSuccess) {
                      toToast(getTranslated("errorOnCallLogDelete"));
                    }
                  });
              onCallLogsCleared();
            },
            child: Text(
              getTranslated("ok").toUpperCase(),
            )),
      ],
      barrierDismissible: true);
}