Covid updates & other fixes

merge-requests/590/merge
haroon amjad 4 years ago
parent ac5077e9e7
commit 927db41068

File diff suppressed because it is too large Load Diff

@ -637,6 +637,7 @@ const Map localizedValues = {
"accountActivation": {"en": "Account Activation", "ar": "تفعيل الحساب"},
"lakumTransfer": {"en": "Lakum Transfer", "ar": "تحويل نقاط لكم"},
"acceptLbl": {"en": "Accept", "ar": "موافقة"},
"declineLbl": {"en": "Decline", "ar": "انخفاض"},
"select-gender": {"en": "Select Gender", "ar": "اختر الجنس"},
"i-am-a": {"en": "I am a ...", "ar": "أنا ..."},
"select-age": {"en": "Select Your Age", "ar": "حدد العمر"},
@ -957,9 +958,8 @@ const Map localizedValues = {
"iAcceptTermsConditions": {"en": "I Accept the Terms and Conditions", "ar": "أوافق على الشروط والأحكام"},
"YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"},
"RRTDDetails": {
"en":
"The RRT service provides medical service for urgent and stable cases, not life-threatening situations or extremities, and the service includes providing medical care from a complete medical team at home.",
"ar": "توفر خدمة فريق الاستجابة السريع RRT خدمه طبيه للحالات المستعجله والمستقره وليست الحالات المهدده للحياه او الاطراف ، وتشمل الخدمه تقديم رعايه طبيه من فريق طبي متكامل بالمنزل."
"en": "The Rapid response team provides a comprehensive medical service for all sorts of urgent and stable cases of all ages, including adult and paediatric patients, the service is covered by a fully equipped and highly trained medical team capable of providing the best medical care at the patients home.",
"ar": "فريق الاستجابة السريعة يقوم بتقديم رعاية صحية متكاملة لجميع الحالات الطارئة و المستقرة، الخدمة تشمل جميع الأعمار بما في ذلك حالات الأطفال، تشمل الخدمة إرسال فريق طبي كامل الجاهزية و على مستوى عالي من التدريب قادر على تقديم أفضل رعاية صحية من داخل المنزل."
},
"rrtService": {"en": "RRT Service", "ar": "خدمة RRT"},
"bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"},

@ -124,7 +124,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 2076117163;
// body['MobileNo'] = "966503109207";
// body['PatientID'] = 2380476; //3844083
// body['PatientID'] = 3114694; //3844083
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574
@ -140,7 +140,7 @@ class BaseAppClient {
if (await Utils.checkConnection()) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
// print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
} else {
@ -307,14 +307,14 @@ class BaseAppClient {
}
}
print("URL : $url");
print("Body : ${json.encode(body)}");
print("Headers : ${json.encode(headers)}");
// print("URL : $url");
// print("Body : ${json.encode(body)}");
// print("Headers : ${json.encode(headers)}");
if (await Utils.checkConnection()) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
// print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
} else {
@ -409,7 +409,7 @@ class BaseAppClient {
url += '?' + queryString;
}
print("URL : $url");
// print("URL : $url");
if (await Utils.checkConnection()) {
final response = await http.get(
@ -417,7 +417,7 @@ class BaseAppClient {
headers: {'Content-Type': 'application/json', 'Accept': 'application/json'},
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
// print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
@ -465,7 +465,7 @@ class BaseAppClient {
'Host': "mdlaboratories.com",
});
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
// print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
if (statusCode == 401) {
@ -473,7 +473,7 @@ class BaseAppClient {
Navigator.of(AppGlobal.context).pushNamed(HOME);
} else {
var bodyUtf = json.decode(utf8.decode(response.bodyBytes));
print(bodyUtf);
// print(bodyUtf);
onFailure(bodyUtf['error']['ErrorEndUserMsg'], statusCode);
}
} else {
@ -494,8 +494,8 @@ class BaseAppClient {
Function(String error, int statusCode) onFailure,
}) async {
String url = fullUrl;
print("URL Query String: $url");
print("body: $body");
// print("URL Query String: $url");
// print("body: $body");
if (await Utils.checkConnection()) {
headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
@ -505,10 +505,10 @@ class BaseAppClient {
headers: headers,
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
// print("statusCode :$statusCode");
if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePost(fullUrl, onFailure: onFailure, onSuccess: onSuccess, body: body, headers: headers);
print(response.body.toString());
// print(response.body.toString());
if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode);
@ -529,7 +529,7 @@ class BaseAppClient {
if (haveParams) {
String queryString = Uri(queryParameters: queryParams).query;
url += '?' + queryString;
print("URL Query String: $url");
// print("URL Query String: $url");
}
if (await Utils.checkConnection()) {
@ -540,7 +540,7 @@ class BaseAppClient {
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
// print("statusCode :$statusCode");
if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleGet(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, queryParams: queryParams);
if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -555,7 +555,7 @@ class BaseAppClient {
simplePut(String fullUrl, {Map<String, dynamic> body, Map<String, String> headers, Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure}) async {
String url = fullUrl;
print("URL Query String: $url");
// print("URL Query String: $url");
if (await Utils.checkConnection()) {
headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
@ -566,7 +566,7 @@ class BaseAppClient {
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
// print("statusCode :$statusCode");
if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePut(fullUrl, onFailure: onFailure, onSuccess: onSuccess, headers: headers, body: body);
if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -582,13 +582,13 @@ class BaseAppClient {
simpleDelete(String fullUrl,
{Function(dynamic response, int statusCode) onSuccess, Function(String error, int statusCode) onFailure, Map<String, String> queryParams, Map<String, String> headers}) async {
String url = fullUrl;
print("URL Query String: $url");
// print("URL Query String: $url");
var haveParams = (queryParams != null);
if (haveParams) {
String queryString = Uri(queryParameters: queryParams).query;
url += '?' + queryString;
print("URL Query String: $url");
// print("URL Query String: $url");
}
if (await Utils.checkConnection()) {
@ -599,7 +599,7 @@ class BaseAppClient {
);
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
// print("statusCode :$statusCode");
if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simpleDelete(fullUrl, onFailure: onFailure, onSuccess: onSuccess, queryParams: queryParams, headers: headers);
if (statusCode < 200 || statusCode >= 400 || json == null) {
@ -729,8 +729,8 @@ class BaseAppClient {
}
}
print("URL : $url");
print("Body : ${json.encode(body)}");
// print("URL : $url");
// print("Body : ${json.encode(body)}");
var ss = json.encode(body);
if (await Utils.checkConnection()) {
@ -746,7 +746,7 @@ class BaseAppClient {
'Username': user != null ? user['PatientID'].toString() : "",
});
final int statusCode = response.statusCode;
print("statusCode :$statusCode");
// print("statusCode :$statusCode");
if (statusCode < 200 || statusCode >= 400 || json == null) {
var parsed = json.decode(utf8.decode(response.bodyBytes));
onFailure(parsed['error']['ErrorEndUserMsgN'] ?? 'Error While Fetching data', statusCode);

@ -44,7 +44,7 @@ class PharmacyModuleService extends BaseService {
var data = await sharedPref.getObject(USER_PROFILE);
var languageID = await sharedPref.getString(APP_LANGUAGE);
Map<String, String> queryParams = {
'Phone': data['MobileNumber'],
'Phone': Utils.getPhoneNumberWithoutZero(data['MobileNumber']),
'FileNumber': data['PatientID'].toString(),
'Language': languageID.toString() == 'en' ? '2' : '1',
'Iqama': data['PatientIdentificationNo'],

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:diplomaticquarterapp/core/viewModels/PharmacyPagesViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
@ -32,6 +34,7 @@ void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
setupLocator();
HttpOverrides.global = MyHttpOverrides();
runApp(MyApp());
}
@ -40,6 +43,15 @@ class MyApp extends StatefulWidget {
_MyApp createState() => new _MyApp();
}
class MyHttpOverrides extends HttpOverrides{
@override
HttpClient createHttpClient(SecurityContext context){
return super.createHttpClient(context)
..badCertificateCallback = (X509Certificate cert, String host, int port)=> true;
}
}
class _MyApp extends State<MyApp> {
AppUpdateInfo _updateInfo;

@ -58,8 +58,6 @@ class _BookReminderPageState extends State<BookReminderPage> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
// print("selectedTime "+selectedTime??"");
print("appointmentNo1 " + widget.patientShareResponse.appointmentNo.toString() ?? "");
return AppScaffold(
appBarTitle: widget.docObject.doctorTitle + " " + widget.docObject.name,
isShowDecPage: false,

@ -12,7 +12,6 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@ -130,7 +129,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
controller: _tabController,
children: <Widget>[
Container(
child: ListView.builder(
child: widget.appoList.length != 0 ? ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
@ -287,10 +286,10 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
),
);
},
),
) : getNoDataWidget(context),
),
Container(
child: ListView.builder(
child: widget.obGyneAppoList.length != 0 ? ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
@ -386,7 +385,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
),
);
},
),
) : getNoDataWidget(context),
),
],
),

@ -186,12 +186,12 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(0);
currentTab = tab;
} else if (tab != 0) {
if (tab == 4 && projectViewModel.isLogin && model.count == 0) {
AppToast.showErrorToast(message: TranslationBase.of(context).noBookedAppo);
} else {
// if (tab == 4 && projectViewModel.isLogin && model.count == 0) {
// AppToast.showErrorToast(message: TranslationBase.of(context).noBookedAppo);
// } else {
pageController.jumpToPage(tab);
currentTab = tab;
}
// }
} else {
pageController.jumpToPage(tab);
currentTab = tab;

@ -14,9 +14,7 @@ import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/my_web_view.dar
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/parking_page.dart';
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/Search.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/new/child_initial_page.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/new/child_vaccine_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
@ -29,7 +27,9 @@ import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
@ -59,7 +59,7 @@ class ServicesView extends StatelessWidget {
});
} else if (index == 1) {
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
Navigator.push(context, FadePage(page: CovidDrivethruLocation()));
showCovidDialog(context);
} else if (index == 2) {
locator<GAnalytics>().hmgServices.logServiceName('online payments');
Navigator.push(context, FadePage(page: PaymentService()));
@ -167,11 +167,14 @@ class ServicesView extends StatelessWidget {
launch("https://hmgwebservices.com/vt_mobile/html/index.html");
} else if (index == 22) {
locator<GAnalytics>().hmgServices.logServiceName('latest news');
Navigator.of(context).push(MaterialPageRoute(
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",
selectedUrl: "https://twitter.com/hashtag/مجموعة_د_سليمان_الحبيب_الطبية?src=hashtag_click&f=live",
),),);
),
),
);
}
},
child: Container(
@ -274,6 +277,20 @@ class ServicesView extends StatelessWidget {
);
}
showCovidDialog(BuildContext context) {
showDialog(
context: context,
builder: (cxt) => CovidConsentDialog(
okTitle: TranslationBase.of(context).acceptLbl,
title: "User Consent",
message:
"Covid-19 Test feature allows you to book appointment for Covid-19 Lab test within HMG branches where a swab sample will be collected & will be processed. Once the result has been processed you shall be notified via SMS on your registered mobile number & the test result will also be available in the Lab Results section of this app. Please note that this result is only available to you & not publicly available to anyone else. \nPlease accept to confirm & proceed.",
onTap: () async {
Navigator.push(context, FadePage(page: CovidDrivethruLocation()));
},
));
}
getPharmacyToken(BuildContext context) async {
if (!authProvider.isLogin) {
Navigator.push(context, FadePage(page: LandingPagePharmacy()));

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/pages/conference/web_rtc/call_home_page.dar
import 'package:diplomaticquarterapp/pages/conference/web_rtc/call_home_page_.dart';
import 'package:diplomaticquarterapp/pages/conference/widgets/platform_exception_alert_dialog.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -29,6 +30,8 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
CameraController _controller;
Future<void> _initializeControllerFuture;
bool isCameraReady = false;
Signaling signaling = Signaling()..init();
@override
void initState() {
@ -198,119 +201,6 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
}
},
),
// body: isCameraReady
// ?
// : Container(
// height: 200.0,
// width: 200.0,
// color: Colors.green,
// ),
// body: Container(
// decoration: BoxDecoration(color: Colors.grey[700]),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.start,
// mainAxisSize: MainAxisSize.max,
// children: <Widget>[
// Container(
// margin: EdgeInsets.only(top: 30.0),
// alignment: Alignment.center,
// child: Text("Incoming Video Call", textAlign: TextAlign.center, style: TextStyle(fontSize: 26.0, color: Colors.white, letterSpacing: 1.0)),
// ),
// Container(
// alignment: Alignment.center,
// margin: EdgeInsets.fromLTRB(50.0, 30.0, 50.0, 20.0),
// child: Image.asset('assets/images/new-design/hmg_full_logo_hd_white.png'),
// ),
// Container(
// margin: EdgeInsets.fromLTRB(30.0, 10.0, 30.0, 0.0),
// child: Divider(
// color: Colors.white,
// thickness: 1.0,
// ),
// ),
// Container(
// margin: EdgeInsets.only(top: 20.0),
// alignment: Alignment.center,
// child: Text("Dr Eyad Ismail Abu Jayab", textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, letterSpacing: 0.8, color: Colors.white)),
// ),
// Container(
// margin: EdgeInsets.only(top: 10.0),
// alignment: Alignment.center,
// child: Text("ENT Clinic", textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, letterSpacing: 0.8, color: Colors.white)),
// ),
// Container(
// margin: EdgeInsets.only(top: 10.0),
// alignment: Alignment.center,
// child: Text("Speciality", textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, letterSpacing: 0.8, color: Colors.white)),
// ),
// Container(
// decoration: BoxDecoration(
// color: Colors.grey[900].withOpacity(0.8),
// borderRadius: BorderRadius.all(Radius.circular(10.0)),
// ),
// padding: EdgeInsets.all(20.0),
// margin: EdgeInsets.only(top: 20.0),
// child: Column(
// children: <Widget>[
// Text("Appointment Information", textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold, letterSpacing: 1.0, color: Colors.white)),
// Container(
// margin: EdgeInsets.only(top: 20.0),
// child: Text("Sun, 15th Dec, 2019, 09:00", textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, letterSpacing: 1.0, color: Colors.white)),
// ),
// Container(
// margin: EdgeInsets.only(top: 20.0),
// child: Text("ENT Clinic", textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, letterSpacing: 1.0, color: Colors.white)),
// ),
// ],
// ),
// ),
// Container(
// margin: EdgeInsets.only(top: 100.0),
// alignment: Alignment.center,
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// children: <Widget>[
// RotationTransition(
// turns: Tween(begin: 0.0, end: -.1).chain(CurveTween(curve: Curves.elasticIn)).animate(_animationController),
// child: Container(
// child: RawMaterialButton(
// onPressed: () {
// _submit();
// },
// elevation: 2.0,
// fillColor: Colors.green,
// child: Icon(
// Icons.call,
// color: Colors.white,
// size: 35.0,
// ),
// padding: EdgeInsets.all(15.0),
// shape: CircleBorder(),
// ),
// )),
// Container(
// child: RawMaterialButton(
// onPressed: () {
// LandingPage.isOpenCallPage = false;
// backToHome();
// },
// elevation: 2.0,
// fillColor: Colors.red,
// child: Icon(
// Icons.call_end,
// color: Colors.white,
// size: 35.0,
// ),
// padding: EdgeInsets.all(15.0),
// shape: CircleBorder(),
// ),
// ),
// ],
// ),
// ),
// ],
// )),
);
}
@ -338,17 +228,8 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
}
Future<void> _submit() async {
// backToHome();
try {
final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity);
// await Navigator.of(context).push(
// MaterialPageRoute<ConferencePage>(
// fullscreenDialog: true,
// builder: (BuildContext context) =>
// ConferencePage(roomModel: roomModel),
// ),
// );
await _controller.dispose();
await Navigator.of(context).pushReplacement(
MaterialPageRoute(
@ -364,10 +245,10 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
}
}
void backToHome() {
void backToHome() async {
final connected = await signaling.declineCall(widget.incomingCallData.callerID, widget.incomingCallData.receiverID);
LandingPage.isOpenCallPage = false;
player.stop();
// disposeAudioResources();
Navigator.of(context).pop();
}

@ -391,7 +391,6 @@ class _clinic_listState extends State<ClinicList> {
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
// AppToast.showErrorToast(message: err);
print(err);
});
}

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -26,20 +27,20 @@ class _ProfileSettings extends State<ProfileSettings> with TickerProviderStateMi
TextEditingController emergencyContact = new TextEditingController();
TextEditingController emailController = new TextEditingController();
TextEditingController emergencyContactName = new TextEditingController();
ProjectViewModel projectProvider;
@override
void initState() {
Future.delayed(new Duration(seconds: 0), () {
ProjectViewModel projectProvider;
projectProvider = Provider.of(context);
if (projectProvider.isLogin == true) getSettings(context);
});
super.initState();
}
Widget build(BuildContext context) {
projectProvider = Provider.of(context);
return BaseView<DashboardViewModel>(
onModelReady: (model) => {},
onModelReady: (model) => {
getSettings()
},
builder: (_, model, wi) => Container(
child: model.user != null
? Column(
@ -329,9 +330,11 @@ class _ProfileSettings extends State<ProfileSettings> with TickerProviderStateMi
);
}
getSettings(context) {
GifLoaderDialogUtils.showMyDialog(context);
authService.getSettings().then((result) => {GifLoaderDialogUtils.hideDialog(context), setValue(result["PateintInfoForUpdateList"][0])});
getSettings() {
// GifLoaderDialogUtils.showMyDialog(AppGlobal.context);
authService.getSettings().then((result) => {
// GifLoaderDialogUtils.hideDialog(AppGlobal.context),
setValue(result["PateintInfoForUpdateList"][0])});
}
setValue(value) {

@ -119,8 +119,8 @@ class _CallPageState extends State<CallPage> {
dummyCall() async {
final json = {
"callerID": "12345",
"receiverID": "54321",
"callerID": "9920",
"receiverID": "2001273",
"msgID": "123",
"notfID": "123",
"notification_foreground": "true",

@ -26,7 +26,8 @@ class Signaling {
initializeSignalR(String userName) async {
if (signalR != null) await signalR.closeConnection();
// https://vcallapi.hmg.com/webRTCHub?source=web&username=zohaib
signalR = SignalRUtil(hubName: "https://vcallapi.hmg.com/webRTCHub?source=mobile&username=$userName");
// signalR = SignalRUtil(hubName: "https://vcallapi.hmg.com/webRTCHub?source=mobile&username=$userName");
signalR = SignalRUtil(hubName: "http://35.193.237.29/webRTCHub?source=mobile&username=$userName");
final connected = await signalR.openConnection();
if (!connected) throw 'Failed to connect SignalR';
}
@ -39,12 +40,24 @@ class Signaling {
// ]
'iceServers': [
// {'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"},
// {'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"}
// {'url': "stun:15.185.116.59:3478"},
// {
// 'urls': ['stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302']
// "url":"turn:15.185.116.59:3479",
// "username": "admin",
// "credential":"admin"
// }
{'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"},
{'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"}
{
"url": "stun:global.stun.twilio.com:3478?transport=udp",
"urls": "stun:global.stun.twilio.com:3478?transport=udp"
},
{
"url": "turn:global.turn.twilio.com:3478?transport=udp",
"username": "f18fc347ba4aeeaa1b00f5199b1e900834b464962d434a4a89b4cdba02510047",
"urls": "turn:global.turn.twilio.com:3478?transport=udp",
"credential": "WX16BB+9nKm0f+Whf5EwpM8S/Yv+T2tlvQWLfdV7oqo="
}
]
};
@ -66,7 +79,7 @@ class Signaling {
// }
Future<bool> acceptCall(String caller, String receiver, {@required MediaStream localMediaStream, @required Function(MediaStream) onRemoteMediaStream}) async {
await initializeSignalR(receiver);
await initializeSignalR("2001273");
signalR.setContributors(caller: caller, receiver: receiver);
await signalR.acceptCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call');
@ -76,7 +89,20 @@ class Signaling {
remoteStream = stream;
onRemoteMediaStream?.call(stream);
};
return true;
}
Future<bool> declineCall(String caller, String receiver) async {
await initializeSignalR(receiver);
signalR.setContributors(caller: caller, receiver: receiver);
await signalR.declineCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call');
// peerConnection.addStream(localMediaStream);
//
// peerConnection?.onAddStream = (MediaStream stream) {
// remoteStream = stream;
// onRemoteMediaStream?.call(stream);
// };
return true;
}

@ -166,8 +166,8 @@ class ClinicListService extends BaseService {
"PatientOutSA": 0,
"SessionID": null,
"isDentalAllowedBackend": true,
"Latitude": lat.toString(),
"Longitude": long.toString(),
"Latitude": lat != null ? lat.toString() : "0.0",
"Longitude": long != null ? long.toString() : "0.0",
"DeviceTypeID": req.DeviceTypeID,
"IsPublicRequest": true
};

@ -2832,6 +2832,8 @@ class TranslationBase {
String get connectTitle => localizedValues["connectTitle"][locale.languageCode];
String get connectSubtitle => localizedValues["connectSubtitle"][locale.languageCode];
String get declineLbl => localizedValues["declineLbl"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -18,18 +18,6 @@ class ConfirmDialog {
ConfirmDialog({@required this.context, this.title, @required this.confirmMessage, @required this.okText, @required this.cancelText, @required this.okFunction, @required this.cancelFunction});
showAlertDialog(BuildContext context) {
// set up the buttons
// set up the AlertDialog
// AlertDialog alert = AlertDialog(
// title: title != null ? Text(title) : Text(TranslationBase.of(context).confirm),
// content: Text(this.confirmMessage),
// actions: [
// cancelButton,
// continueButton,
// ],
// );
Dialog alert = Dialog(
child: Container(
color: Colors.transparent,

@ -0,0 +1,84 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:flutter/material.dart';
class CovidConsentDialog extends StatelessWidget {
final String title;
final String message;
final String okTitle;
final VoidCallback onTap;
const CovidConsentDialog({Key key, this.title, @required this.message, this.okTitle, this.onTap}) : super(key: key);
@override
Widget build(BuildContext context) {
return Dialog(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(),
insetPadding: EdgeInsets.only(left: 21, right: 21),
child: Padding(
padding: EdgeInsets.only(left: 20, right: 20, top: 18, bottom: 28),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.only(top: 16.0),
child: Text(
title ?? TranslationBase.of(context).confirm,
style: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: Color(0xff2B353E), height: 35 / 24, letterSpacing: -0.96),
),
),
),
IconButton(
padding: EdgeInsets.zero,
icon: Icon(Icons.close),
color: Color(0xff2B353E),
constraints: BoxConstraints(),
onPressed: () {
Navigator.pop(context);
},
)
],
),
Text(
message,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff808080), letterSpacing: -0.48),
),
SizedBox(height: 28),
Row(
mainAxisSize: MainAxisSize.min,
children: [
Expanded(
child: DefaultButton(
TranslationBase.of(context).declineLbl,
() => Navigator.pop(context),
textColor: Colors.white,
color: CustomColors.accentColor,
),
),
SizedBox(width: 10),
Expanded(
child: DefaultButton(
okTitle ?? TranslationBase.of(context).ok,
() {
Navigator.pop(context);
onTap();
},
textColor: Colors.white,
color: CustomColors.green,
),
),
],
),
],
),
),
);
}
}

@ -16,6 +16,7 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStat
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
@ -443,7 +444,7 @@ class _AppDrawerState extends State<AppDrawer> {
mHeight(12),
InkWell(
onTap: () {
// Navigator.push(context, FadePage(page: CallPage()));
Navigator.push(context, FadePage(page: CallPage()));
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('cloud solution logo tap');
String patientID = '2001273';
GifLoaderDialogUtils.showMyDialog(context);

@ -31,13 +31,12 @@ class MyInAppBrowser extends InAppBrowser {
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';

@ -204,6 +204,7 @@ dependency_overrides:
provider : ^5.0.0
permission_handler : ^6.0.1+1
flutter_svg: ^1.0.0
firebase_messaging_platform_interface: 3.1.6
dev_dependencies:

Loading…
Cancel
Save