makeVideoCall method
void
makeVideoCall()
Implementation
void makeVideoCall() async {
closeKeyBoard();
AppUtils.isNetConnected().then((value) {
if (value) {
AppPermission.askVideoCallPermissions(context).then((permission) {
if (permission) {
if (profile.isGroupProfile.checkNull()) {
MirrorflyUikit.instance.navigationManager.navigateTo(
context: context,
pageToNavigate: GroupParticipantsView(
groupId: profile.jid!,
callType: CallType.video,
),
routeName: Constants.groupParticipantView,
);
} else {
Mirrorfly.makeVideoCall(
toUserJid: profile.jid.checkNull(),
flyCallBack: (FlyResponse response) {
if (response.isSuccess) {
setOnGoingUserGone();
MirrorflyUikit.instance.navigationManager.navigateTo(
context: context,
pageToNavigate:
OutGoingCallView(userJid: [profile.jid!]),
routeName: Constants.outGoingCallView,
onNavigateComplete: () {
setOnGoingUserAvail();
});
}
});
}
} else {
LogMessage.d("askVideoCallPermissions", "false");
}
});
} else {
toToast(Constants.noInternetConnection);
}
});
}