development_haroon_merge_aamir
haroon amjad 2 years ago
parent 3037925016
commit cd4b9d8c74

@ -86,5 +86,7 @@ flutter {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
}

@ -73,7 +73,7 @@ class AppNotifications {
if (initialMessage != null) _handleMessage(initialMessage);
FirebaseMessaging.onMessage.listen((RemoteMessage message) {
if (message.notification != null) _handleMessage(message);
_handleMessage(message);
});
FirebaseMessaging.onMessageOpenedApp.listen(_handleOpenApp);
@ -134,23 +134,26 @@ class AppNotifications {
Utils.saveStringFromPrefs("isAppOpendByChat", "false");
GetNotificationsResponseModel notification = GetNotificationsResponseModel();
notification.createdOn = DateUtil.getMonthDayYearDateFormatted(DateTime.now());
notification.messageTypeData = message.data['picture'];
notification.message = message.data['message'];
notification.notificationType = message.data["NotificationType"].toString();
if (message.data["NotificationType"] == "2") {
notification.videoURL = message.data["VideoUrl"];
}
if (message.notification != null) {
notification.createdOn = DateUtil.getMonthDayYearDateFormatted(DateTime.now());
notification.messageTypeData = message.data['picture'];
notification.message = message.data['message'];
notification.notificationType = message.data["NotificationType"].toString();
if (message.data["NotificationType"] == "2") {
notification.videoURL = message.data["VideoUrl"];
}
Future.delayed(Duration(seconds: 5), () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => NotificationsDetailsPage(
notification: notification,
Future.delayed(Duration(seconds: 5), () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => NotificationsDetailsPage(
notification: notification,
),
),
),
);
});
);
});
}
if (message.data.isNotEmpty && message.data["messageType"] == 'chat') {
Utils.saveStringFromPrefs("isAppOpendByChat", "true");
Utils.saveStringFromPrefs("notificationData", message.data["user_chat_history_response"].toString());
@ -187,8 +190,6 @@ class AppNotifications {
});
}
}
}
const AndroidNotificationChannel channel = AndroidNotificationChannel(

@ -154,7 +154,7 @@ class _StartCallPageState extends State<StartCallPage> {
RTCVideoView(
provider.remoteRenderer!,
objectFit: RTCVideoViewObjectFit.RTCVideoViewObjectFitContain,
filterQuality: FilterQuality.high,
// filterQuality: FilterQuality.high,
key: const Key('remote'),
),
if (provider.isVideoCall)
@ -174,7 +174,7 @@ class _StartCallPageState extends State<StartCallPage> {
child: RTCVideoView(
provider.localVideoRenderer!,
mirror: true,
filterQuality: FilterQuality.high,
// filterQuality: FilterQuality.high,
objectFit: RTCVideoViewObjectFit.RTCVideoViewObjectFitCover,
),
),

@ -98,8 +98,10 @@ class _LoginScreenState extends State<LoginScreen> with WidgetsBindingObserver {
void setupVoIPCallBacks() {
if (Platform.isIOS) {
voIPKit.getVoIPToken().then((String? value) async {
print('🎈 example: getVoIPToken: $value');
if (value != null) {
AppState().setiosVoipPlayerID = await ChatApiClient().oneSignalVoip(value!);
print('🎈 example: OneSignal ID: ${AppState().iosVoipPlayerID}');
}
});
}
@ -150,8 +152,11 @@ class _LoginScreenState extends State<LoginScreen> with WidgetsBindingObserver {
isIncomingCall = true;
if (AppState().getisUserOnline) {
_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 {
_iosCallPayload = IosCallPayload(
uuid: uuid, incomingCallerId: callDetails.split("-")[0], incomingCallReciverId: callDetails.split("-")[1], incomingCallerName: null, incomingCallType: callDetails.split("-").last);
@ -398,6 +403,7 @@ class _LoginScreenState extends State<LoginScreen> with WidgetsBindingObserver {
Utils.showLoading(context);
Future.delayed(Duration(seconds: Platform.isIOS ? 3 : 2)).whenComplete(() {
if (!isIncomingCall) {
Utils.hideLoading(context);
if (isAppOpenBySystem!) checkFirebaseToken();
}
});

@ -76,7 +76,7 @@ class _OffersAndDiscountsDetailsState extends State<OffersAndDiscountsDetails> {
: getOffersList[0].titleEn!.toText22(isBold: true, color: const Color(0xff2B353E)).center,
Html(
data: AppState().isArabic(context) ? getOffersList[0].descriptionAr! : getOffersList[0].descriptionEn ?? "",
onLinkTap: (String? url, Map<String, String> attributes, _) {
onLinkTap: (String? url, RenderContext context, Map<String, String> attributes, _) {
launchUrl(Uri.parse(url!));
},
),

Loading…
Cancel
Save