|
|
|
|
@ -17,10 +17,10 @@ import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/videocall-webrtc-rnd/webrtc/start_video_call.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family;
|
|
|
|
|
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
|
|
|
|
|
@ -40,7 +40,6 @@ import 'package:firebase_messaging/firebase_messaging.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_app_icon_badge/flutter_app_icon_badge.dart';
|
|
|
|
|
import 'package:flutter_ios_voip_kit/call_state_type.dart';
|
|
|
|
|
import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart';
|
|
|
|
|
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
|
|
|
|
@ -449,8 +448,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dummyCall() async {
|
|
|
|
|
final json = {
|
|
|
|
|
"callerID": "s1",
|
|
|
|
|
@ -459,7 +456,6 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
"notfID": "123",
|
|
|
|
|
"notification_foreground": "true",
|
|
|
|
|
"count": "1",
|
|
|
|
|
|
|
|
|
|
"message": "Doctor is calling ",
|
|
|
|
|
"AppointmentNo": "123",
|
|
|
|
|
"title": "Rayyan Hospital",
|
|
|
|
|
@ -473,7 +469,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
"appointmenttime": "09:00",
|
|
|
|
|
"type": "video",
|
|
|
|
|
"session_id":
|
|
|
|
|
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk",
|
|
|
|
|
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk",
|
|
|
|
|
"identity": "Haroon1",
|
|
|
|
|
"name": "SmallDailyStandup",
|
|
|
|
|
"videoUrl": "video",
|
|
|
|
|
@ -703,6 +699,17 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
|
|
|
|
|
} else {
|
|
|
|
|
projectViewModel.analytics.setUser(null);
|
|
|
|
|
}
|
|
|
|
|
String voipToken = await sharedPref.getString(APNS_TOKEN);
|
|
|
|
|
getOneSignalVOIPToken(voipToken);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getOneSignalVOIPToken(String voipToken) {
|
|
|
|
|
LiveCareService service = new LiveCareService();
|
|
|
|
|
service.getOneSignalVOIPToken(voipToken, context).then((res) {
|
|
|
|
|
AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, res['id']);
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
print(err);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void showUserConsent() {
|
|
|
|
|
|