makeVideoCall method

void makeVideoCall()

Implementation

void makeVideoCall() async {
  closeKeyBoard();
  if (await AppUtils.isNetConnected()) {
    if (await AppPermission.askVideoCallPermissions()) {
      if (profile.isGroupProfile.checkNull()) {
        NavUtils.toNamed(Routes.groupParticipants,
            arguments: {"groupId": profile.jid, "callType": CallType.video});
      } else {
        Mirrorfly.makeVideoCall(
            toUserJid: profile.jid.checkNull(),
            flyCallBack: (FlyResponse response) {
              if (response.isSuccess) {
                setOnGoingUserGone();
                NavUtils.toNamed(Routes.outGoingCallView, arguments: {
                  "userJid": [profile.jid],
                  "callType": CallType.video
                })?.then((value) => setOnGoingUserAvail());
              }
            });
      }
    } else {
      LogMessage.d("askVideoCallPermissions", "false");
    }
  } else {
    toToast(getTranslated("noInternetConnection"));
  }
}