|
|
|
@ -95,11 +95,12 @@ class _LoginScreenState extends State<LoginScreen> with WidgetsBindingObserver {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// IOS Voip Call
|
|
|
|
// IOS Voip Call
|
|
|
|
void setupVoIPCallBacks() {
|
|
|
|
Future<void> setupVoIPCallBacks() async {
|
|
|
|
if (Platform.isIOS) {
|
|
|
|
if (Platform.isIOS) {
|
|
|
|
voIPKit.getVoIPToken().then((String? value) async {
|
|
|
|
voIPKit.getVoIPToken().then((String? value) async {
|
|
|
|
|
|
|
|
print('🎈 example: setupVoIPCallBacks: $value');
|
|
|
|
if (value != null) {
|
|
|
|
if (value != null) {
|
|
|
|
AppState().setiosVoipPlayerID = await ChatApiClient().oneSignalVoip(value!);
|
|
|
|
AppState().setiosVoipPlayerID = await ChatApiClient().oneSignalVoip(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -150,8 +151,11 @@ class _LoginScreenState extends State<LoginScreen> with WidgetsBindingObserver {
|
|
|
|
isIncomingCall = true;
|
|
|
|
isIncomingCall = true;
|
|
|
|
if (AppState().getisUserOnline) {
|
|
|
|
if (AppState().getisUserOnline) {
|
|
|
|
_iosCallPayload = IosCallPayload(
|
|
|
|
_iosCallPayload = IosCallPayload(
|
|
|
|
uuid: uuid, incomingCallerId: callDetails.split("-")[0], incomingCallReciverId: callDetails.split("-")[1], incomingCallerName: _iosCallPayload!.incomingCallerName, incomingCallType: callDetails.split("-").last);
|
|
|
|
uuid: uuid,
|
|
|
|
|
|
|
|
incomingCallerId: callDetails.split("-")[0],
|
|
|
|
|
|
|
|
incomingCallReciverId: callDetails.split("-")[1],
|
|
|
|
|
|
|
|
incomingCallerName: _iosCallPayload!.incomingCallerName,
|
|
|
|
|
|
|
|
incomingCallType: callDetails.split("-").last);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
_iosCallPayload = IosCallPayload(
|
|
|
|
_iosCallPayload = IosCallPayload(
|
|
|
|
uuid: uuid, incomingCallerId: callDetails.split("-")[0], incomingCallReciverId: callDetails.split("-")[1], incomingCallerName: null, incomingCallType: callDetails.split("-").last);
|
|
|
|
uuid: uuid, incomingCallerId: callDetails.split("-")[0], incomingCallReciverId: callDetails.split("-")[1], incomingCallerName: null, incomingCallType: callDetails.split("-").last);
|
|
|
|
|