Merge branch 'development_new_design_2.0' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into hussam_pharmacy_fix

merge-update-with-lab-changes
hussam al-habibeh 4 years ago
commit 9c8bd64142

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -15,8 +15,8 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_ORDERS = '/api/orders';
const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -1082,7 +1082,7 @@ const Map localizedValues = {
"removeFromWishlist": {"en": "Remove From Wishlist", "ar": "احذف للمفضلة"}, "removeFromWishlist": {"en": "Remove From Wishlist", "ar": "احذف للمفضلة"},
"noData": {"en": "There is no data", "ar": "لايوجد بيانات"}, "noData": {"en": "There is no data", "ar": "لايوجد بيانات"},
"no_data": {"en": "No data", "ar": "لايوجد بيانات"}, "no_data": {"en": "No data", "ar": "لايوجد بيانات"},
"buyNow": {"en": "buy now", "ar": "إشتري الان"}, "buyNow": {"en": "Buy Now", "ar": "إشتري الان"},
"quantityShortcut": {"en": "QTY", "ar": "كمية"}, "quantityShortcut": {"en": "QTY", "ar": "كمية"},
"pharmacyServiceTermsCondition": {"en": "I agree with the terms of service and I adhere to them unconditionally", "ar": " موافق على شروط الخدمة وألتزم بها دون قيد أو شرط"}, "pharmacyServiceTermsCondition": {"en": "I agree with the terms of service and I adhere to them unconditionally", "ar": " موافق على شروط الخدمة وألتزم بها دون قيد أو شرط"},
"Year": {"en": "YEAR", "ar": "السنة"}, "Year": {"en": "YEAR", "ar": "السنة"},
@ -1532,6 +1532,7 @@ const Map localizedValues = {
"rateDoctorAppo": {"en": "Rate DR & Appointment", "ar": "تقييم الطبيب والموعد"}, "rateDoctorAppo": {"en": "Rate DR & Appointment", "ar": "تقييم الطبيب والموعد"},
"invoice": {"en": "Invoice", "ar": "الفاتورة"}, "invoice": {"en": "Invoice", "ar": "الفاتورة"},
"requestedDate": {"en": "Req Date", "ar": "التاريخ "}, "requestedDate": {"en": "Req Date", "ar": "التاريخ "},
"requestedDateLiveCare": {"en": "Requested Date: ", "ar": "التاريخ: "},
"callDuration": {"en": "Call Duration", "ar": "مدة الاتصال"}, "callDuration": {"en": "Call Duration", "ar": "مدة الاتصال"},
"alreadyRated": {"en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً"}, "alreadyRated": {"en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً"},
"insuranceCompany": {"en": "Insurance Company", "ar": "شركة تأمين"}, "insuranceCompany": {"en": "Insurance Company", "ar": "شركة تأمين"},
@ -1724,7 +1725,6 @@ const Map localizedValues = {
"dietModerate":{"en":"Moderate Carb","ar":"حمية معتدلة الكربوهيدرات"}, "dietModerate":{"en":"Moderate Carb","ar":"حمية معتدلة الكربوهيدرات"},
"dietUSDA":{"en":"USDA Guidelines","ar":"ارشادات وزارة الزراعة الأمريكية"}, "dietUSDA":{"en":"USDA Guidelines","ar":"ارشادات وزارة الزراعة الأمريكية"},
"dietZone":{"en":"Zone Diet","ar":"حمية زون"}, "dietZone":{"en":"Zone Diet","ar":"حمية زون"},
"Protein": {"en": "Protein", "ar": "بروتين"}, "Protein": {"en": "Protein", "ar": "بروتين"},
"Cals": {"en": "Cals", "ar": "كالس"}, "Cals": {"en": "Cals", "ar": "كالس"},
"gramsPerDay": {"en": "Grams Per Day", "ar": "غرام في اليوم"}, "gramsPerDay": {"en": "Grams Per Day", "ar": "غرام في اليوم"},
@ -1737,4 +1737,6 @@ const Map localizedValues = {
"productOutOfStock": {"en": "Out Of Stock", "ar": "إنتهى من المخزن"}, "productOutOfStock": {"en": "Out Of Stock", "ar": "إنتهى من المخزن"},
"productQuantity": {"en": "Quantity", "ar": "كمية"}, "productQuantity": {"en": "Quantity", "ar": "كمية"},
"yourTurn": {"en": "your turn is after", "ar": "دورك بعد"},
"patients": {"en": "patients", "ar": "مرضي"},
}; };

@ -28,7 +28,7 @@ class PrescriptionDeliveryService extends BaseService {
body['AppointmentNo'] = appointmentNo.toString(); body['AppointmentNo'] = appointmentNo.toString();
// body['CreatedBy'] = createdBy; // body['CreatedBy'] = createdBy;
body['DischargeID'] = dischargeID.toString(); body['DischargeID'] = dischargeID.toString();
await baseAppClient.post(ADD_PRESCRIPTION_ORDER_RC, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(ADD_PRESCRIPTION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {
var asd = ""; var asd = "";
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

@ -55,7 +55,7 @@ class PrescriptionsService extends BaseService {
prescriptionsOrderListRC.clear(); prescriptionsOrderListRC.clear();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['ID'] = orderID; body['ID'] = orderID;
await baseAppClient.post(GET_ALL_PRESCRIPTION_INFO_RC + "?PatientId=" + patientID.toString(), onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(GET_ALL_PRESCRIPTION_INFO_RC + "?PatientId=" + patientID.toString(), isRCService: true, onSuccess: (dynamic response, int statusCode) {
response['response']['report'].forEach((prescriptionsOrder) { response['response']['report'].forEach((prescriptionsOrder) {
prescriptionsOrderListRC.add(PrescriptionInfoRCModel.fromJson(prescriptionsOrder)); prescriptionsOrderListRC.add(PrescriptionInfoRCModel.fromJson(prescriptionsOrder));
}); });
@ -69,7 +69,7 @@ class PrescriptionsService extends BaseService {
prescriptionsOrderList.clear(); prescriptionsOrderList.clear();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
// body['isDentalAllowedBackend'] = false; // body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_ALL_PRESCRIPTION_ORDERS_RC, onSuccess: (dynamic response, int statusCode) { await baseAppClient.post(GET_ALL_PRESCRIPTION_ORDERS_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {
response['response'].forEach((prescriptionsOrder) { response['response'].forEach((prescriptionsOrder) {
prescriptionsOrderList.add(GetCMCAllOrdersResponseModel.fromJson(prescriptionsOrder)); prescriptionsOrderList.add(GetCMCAllOrdersResponseModel.fromJson(prescriptionsOrder));
}); });

@ -248,6 +248,9 @@ class OrderPreviewService extends BaseService {
case 4: case 4:
return "INSTALLMENT"; return "INSTALLMENT";
break; break;
case 5:
return "ApplePay";
break;
default: default:
return ""; return "";
} }

@ -147,9 +147,9 @@ class PrescriptionsViewModel extends BaseViewModel {
} }
} }
getPrescriptionReportDetailsRC() async { getPrescriptionReportDetailsRC(int orderID, dynamic patientID) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionsInfoRC(4, 2001273); await _prescriptionsService.getPrescriptionsInfoRC(orderID, patientID);
if (_prescriptionsService.hasError) { if (_prescriptionsService.hasError) {
error = _prescriptionsService.error; error = _prescriptionsService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -156,6 +156,8 @@ class OrderPreviewViewModel extends BaseViewModel {
case 4: case 4:
return "${assetFile}installment.png"; return "${assetFile}installment.png";
break; break;
case 5:
return "${assetFile}applePay.png";
default: default:
return ""; return "";
} }

@ -27,7 +27,7 @@ void main() async {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
FirebaseApp defaultApp = await Firebase.initializeApp(); FirebaseApp defaultApp = await Firebase.initializeApp();
setupLocator(); await setupLocator();
runApp(MyApp()); runApp(MyApp());
} }
@ -39,6 +39,8 @@ class MyApp extends StatefulWidget {
class _MyApp extends State<MyApp> { class _MyApp extends State<MyApp> {
AppUpdateInfo _updateInfo; AppUpdateInfo _updateInfo;
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
Future<void> checkForUpdate() async { Future<void> checkForUpdate() async {
InAppUpdate.checkForUpdate().then((info) { InAppUpdate.checkForUpdate().then((info) {
if (info.updateAvailable) { if (info.updateAvailable) {
@ -112,7 +114,7 @@ class _MyApp extends State<MyApp> {
// ], // ],
navigatorKey: locator<NavigationService>().navigatorKey, navigatorKey: locator<NavigationService>().navigatorKey,
showSemanticsDebugger: false, showSemanticsDebugger: false,
title: 'Diplomatic Quarter App', title: 'Dr. AlHabib',
locale: projectProvider.appLocal, locale: projectProvider.appLocal,
localizationsDelegates: [ localizationsDelegates: [
TranslationBaseDelegate(), TranslationBaseDelegate(),

@ -26,6 +26,7 @@ import 'package:diplomaticquarterapp/uitl/SignalRUtil.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart'; import 'package:diplomaticquarterapp/widgets/bottom_navigation/bottom_nav_bar.dart';
import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart';
@ -422,6 +423,17 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (message.containsKey('data')) { if (message.containsKey('data')) {
LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
LandingPage.isOpenCallPage = true; LandingPage.isOpenCallPage = true;
// Future.delayed(Duration(seconds: 3), () {
// Navigator.push(locator<NavigationService>().navigatorKey.currentContext, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData)));
NavigationService.instance.navigateTo(INCOMING_CALL_PAGE);
// });
// if (!isPageNavigated) {
// isPageNavigated = true;
// Navigator.push(locator<NavigationService>().navigatorKey.currentContext, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData)));
// .then((value) {
// isPageNavigated = false;
// });
// }
} }
if (message.containsKey('notification')) { if (message.containsKey('notification')) {

@ -1,9 +1,14 @@
import 'dart:ui';
import 'package:camera/camera.dart';
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
import 'package:diplomaticquarterapp/models/LiveCare/room_model.dart'; import 'package:diplomaticquarterapp/models/LiveCare/room_model.dart';
import 'package:diplomaticquarterapp/pages/conference/conference_page.dart'; import 'package:diplomaticquarterapp/pages/conference/conference_page.dart';
import 'package:diplomaticquarterapp/pages/conference/web_rtc/call_home_page.dart'; 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/conference/widgets/platform_exception_alert_dialog.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.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'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:just_audio/just_audio.dart'; import 'package:just_audio/just_audio.dart';
@ -21,10 +26,14 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
AnimationController _animationController; AnimationController _animationController;
final player = AudioPlayer(); final player = AudioPlayer();
CameraController _controller;
Future<void> _initializeControllerFuture;
bool isCameraReady = false;
@override @override
void initState() { void initState() {
_animationController = AnimationController(vsync: this, duration: Duration(milliseconds: 500)); _animationController = AnimationController(vsync: this, duration: Duration(milliseconds: 500));
isCameraReady = false;
WidgetsBinding.instance.addPostFrameCallback((_) => _runAnimation()); WidgetsBinding.instance.addPostFrameCallback((_) => _runAnimation());
@ -39,6 +48,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
void dispose() { void dispose() {
_animationController.dispose(); _animationController.dispose();
player.stop(); player.stop();
_controller.dispose();
disposeAudioResources(); disposeAudioResources();
super.dispose(); super.dispose();
} }
@ -48,118 +58,279 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
return AppScaffold( return AppScaffold(
isShowAppBar: false, isShowAppBar: false,
isShowDecPage: false, isShowDecPage: false,
body: SafeArea( body: FutureBuilder<void>(
child: Container( future: _initializeControllerFuture,
decoration: BoxDecoration(color: Colors.grey[700]), builder: (context, snapshot) {
child: Column( if (snapshot.connectionState == ConnectionState.done) {
mainAxisAlignment: MainAxisAlignment.start, return Stack(
mainAxisSize: MainAxisSize.max, alignment: FractionalOffset.center,
children: <Widget>[ children: <Widget>[
Container( new Positioned.fill(
margin: EdgeInsets.only(top: 30.0), child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)),
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( new Positioned.fill(
margin: EdgeInsets.only(top: 100.0), child: new ClipRect(
alignment: Alignment.center, child: new BackdropFilter(
child: Row( filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
mainAxisSize: MainAxisSize.max, child: new Container(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, decoration: new BoxDecoration(color: Colors.grey[800].withOpacity(0.8)),
children: <Widget>[ child: Column(
RotationTransition( crossAxisAlignment: CrossAxisAlignment.start,
turns: Tween(begin: 0.0, end: -.1).chain(CurveTween(curve: Curves.elasticIn)).animate(_animationController), mainAxisSize: MainAxisSize.max,
child: Container( children: [
child: RawMaterialButton( Container(
onPressed: () { margin: const EdgeInsets.all(21.0),
_submit(); child: Row(
}, children: [
elevation: 2.0, Image.asset(
fillColor: Colors.green, "assets/images/new/logo.png",
child: Icon( height: 70,
Icons.call, width: 70,
color: Colors.white, ),
size: 35.0, Container(
margin: const EdgeInsets.only(left: 10.0, right: 10.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
widget.incomingCallData.doctorname,
style: TextStyle(fontSize: 21, fontWeight: FontWeight.bold, color: Colors.white, letterSpacing: -1.26, height: 23 / 12),
),
Text(
TranslationBase.of(context).videoAppo,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xffC6C6C6), letterSpacing: -0.48, height: 23 / 24),
),
SizedBox(height: 2),
],
),
),
],
),
),
Container(
margin: const EdgeInsets.all(21.0),
width: MediaQuery.of(context).size.width,
decoration: cardRadius(15.0, color: Colors.black),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Container(
padding: const EdgeInsets.fromLTRB(16.0, 16.0, 16.0, 6.0),
child: Text(
TranslationBase.of(context).appoInfo,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 23 / 12),
),
),
Container(
padding: const EdgeInsets.only(left: 16.0, right: 16.0),
child: Text(
widget.incomingCallData.appointmentdate + ", " + widget.incomingCallData.appointmenttime,
style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600),
),
),
Container(
padding: const EdgeInsets.only(left: 16.0, right: 16.0, bottom: 21.0),
child: Text(
widget.incomingCallData.clinicname,
style: TextStyle(fontSize: 12.0, letterSpacing: -0.48, color: Color(0xff8E8E8E), fontWeight: FontWeight.w600),
),
),
],
),
),
Spacer(),
Container(
margin: EdgeInsets.only(bottom: 70.0, left: 49, right: 49),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
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(),
),
),
],
), ),
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(),
), ),
), ),
], ),
), ),
), ),
], ],
)), );
} else {
return const Center(child: CircularProgressIndicator());
}
},
), ),
// 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(),
// ),
// ),
// ],
// ),
// ),
// ],
// )),
); );
} }
void _runAnimation() async { void _runAnimation() async {
final cameras = await availableCameras();
final firstCamera = cameras[1];
_controller = CameraController(
// Get a specific camera from the list of available cameras.
firstCamera,
// Define the resolution to use.
ResolutionPreset.medium,
);
_initializeControllerFuture = _controller.initialize();
setState(() {
isCameraReady = true;
});
setAudioFile(); setAudioFile();
for (int i = 0; i < 100; i++) { for (int i = 0; i < 100; i++) {
await _animationController.forward(); await _animationController.forward();

@ -1,18 +1,22 @@
import 'package:circular_countdown_timer/circular_countdown_timer.dart'; import 'package:circular_countdown_timer/circular_countdown_timer.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart'; import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LiveCarePendingRequest extends StatefulWidget { class LiveCarePendingRequest extends StatefulWidget {
ErRequestHistoryList pendingERRequestHistoryList; ErRequestHistoryList pendingERRequestHistoryList;
final Function getLiveCareHistory; final Function getLiveCareHistory;
LiveCarePendingRequest( LiveCarePendingRequest({@required this.getLiveCareHistory, this.pendingERRequestHistoryList});
{@required this.getLiveCareHistory, this.pendingERRequestHistoryList});
@override @override
_LiveCarePendingRequestState createState() => _LiveCarePendingRequestState(); _LiveCarePendingRequestState createState() => _LiveCarePendingRequestState();
@ -27,136 +31,197 @@ class _LiveCarePendingRequestState extends State<LiveCarePendingRequest> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
decoration: BoxDecoration( margin: EdgeInsets.fromLTRB(21, 21, 21, 12),
border: Border.all(color: Colors.grey[300]),
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle,
),
margin: EdgeInsets.all(15.0),
padding: EdgeInsets.all(10.0), padding: EdgeInsets.all(10.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: [
Container(
child: Text("In Progress:",
style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
Container(
alignment: Alignment.center,
margin: EdgeInsets.only(top: 10.0),
child: Text("Estimated Waiting Time: ",
style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
),
Container(
transform: Matrix4.translationValues(0.0, -50.0, 0.0),
alignment: Alignment.center,
child: CircularCountDownTimer(
duration:
widget.pendingERRequestHistoryList.watingtimeInteger * 60,
width: MediaQuery.of(context).size.width / 3,
height: MediaQuery.of(context).size.height / 3,
color: Colors.white,
fillColor: Colors.green[700],
strokeWidth: 15.0,
textStyle: TextStyle(
fontSize: 22.0,
color: Colors.black87,
fontWeight: FontWeight.bold),
isReverse: true,
isTimerTextShown: true,
onComplete: () {
print('Countdown Ended');
},
),
),
Container(
transform: Matrix4.translationValues(0.0, -60.0, 0.0),
child: Divider(
color: Colors.grey[500],
thickness: 0.7,
),
),
Container( Container(
transform: Matrix4.translationValues(0.0, -50.0, 0.0), width: MediaQuery.of(context).size.width,
child: Text("Requested date:", decoration: cardRadius(15.0),
style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold)), child: Column(
), crossAxisAlignment: CrossAxisAlignment.start,
Container( children: [
transform: Matrix4.translationValues(0.0, -30.0, 0.0), Container(
child: Text( padding: const EdgeInsets.fromLTRB(16, 21, 16, 23),
DateUtil.getDateFormatted( child: Text(TranslationBase.of(context).waitingTime, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)),
widget.pendingERRequestHistoryList.arrivalTime), ),
style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)), Container(
), height: MediaQuery.of(context).size.height * 0.25,
Container( transform: Matrix4.translationValues(0.0, -10.0, 0.0),
transform: Matrix4.translationValues(0.0, -20.0, 0.0), alignment: Alignment.center,
padding: EdgeInsets.all(7.0), child: CircularCountDownTimer(
decoration: BoxDecoration( duration: widget.pendingERRequestHistoryList.watingtimeInteger * 60,
shape: BoxShape.rectangle, width: MediaQuery.of(context).size.width / 2,
borderRadius: BorderRadius.all(Radius.circular(5)), height: MediaQuery.of(context).size.height / 2,
color: Colors.red[800], color: Colors.white,
), fillColor: CustomColors.green,
margin: EdgeInsets.only(top: 5.0, bottom: 5.0), strokeWidth: 7.0,
child: Text(widget.pendingERRequestHistoryList.stringCallStatus, textStyle: TextStyle(fontSize: 32.0, color: Color(0xff2E303A), fontWeight: FontWeight.w400),
style: TextStyle(fontSize: 14.0, color: Colors.white)), isReverse: true,
), isTimerTextShown: true,
Container( onComplete: () {
transform: Matrix4.translationValues(0.0, 0.0, 0.0), print('Countdown Ended');
child: Divider( },
color: Colors.grey[500], ),
thickness: 0.7, ),
],
), ),
), ),
Container( Container(
alignment: Alignment.center, margin: const EdgeInsets.fromLTRB(0, 12, 0, 0),
transform: Matrix4.translationValues(0.0, 10.0, 0.0), padding: const EdgeInsets.fromLTRB(16, 21, 16, 12),
child: Text(
"Your turn is after " +
widget.pendingERRequestHistoryList.patCount.toString() +
" Patients",
style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
Container(
transform: Matrix4.translationValues(0.0, 110.0, 0.0),
alignment: Alignment.bottomCenter,
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
child: ButtonTheme( decoration: cardRadius(15.0),
shape: RoundedRectangleBorder( child: Column(
borderRadius: BorderRadius.circular(10.0), crossAxisAlignment: CrossAxisAlignment.start,
), children: [
minWidth: MediaQuery.of(context).size.width, Container(
height: 45.0, decoration: cardRadius(15.0, color: Color(0xffCC9B14)),
child: RaisedButton( padding: const EdgeInsets.all(5.0),
color: Colors.red[800], child: Text(widget.pendingERRequestHistoryList.stringCallStatus, style: TextStyle(fontSize: 10.0, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4)),
textColor: Colors.white, ),
elevation: 0, Container(
disabledTextColor: Colors.white, padding: const EdgeInsets.all(5.0),
disabledColor: new Color(0xFFbcc2c4), child: MyRichText(TranslationBase.of(context).requestedDateLiveCare,
onPressed: () { DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.pendingERRequestHistoryList.arrivalTime)), projectViewModel.isArabic),
cancelLiveCareRequest(); ),
}, Container(
child: Text(TranslationBase.of(context).cancel, padding: const EdgeInsets.all(5.0),
style: TextStyle(fontSize: 18.0)), child: Text(TranslationBase.of(context).yourTurn + " " + widget.pendingERRequestHistoryList.patCount.toString() + " " + TranslationBase.of(context).patients,
), style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.48)),
),
// Container(
// child: DefaultButton(TranslationBase.of(context).cancel, () {
// cancelLiveCareRequest();
// }),
// ),
],
), ),
), ),
], ],
), ),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Container(
// child: Text("In Progress:",
// style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// alignment: Alignment.center,
// margin: EdgeInsets.only(top: 10.0),
// child: Text("Estimated Waiting Time: ",
// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -50.0, 0.0),
// alignment: Alignment.center,
// child: CircularCountDownTimer(
// duration:
// widget.pendingERRequestHistoryList.watingtimeInteger * 60,
// width: MediaQuery.of(context).size.width / 3,
// height: MediaQuery.of(context).size.height / 3,
// color: Colors.white,
// fillColor: Colors.green[700],
// strokeWidth: 15.0,
// textStyle: TextStyle(
// fontSize: 22.0,
// color: Colors.black87,
// fontWeight: FontWeight.bold),
// isReverse: true,
// isTimerTextShown: true,
// onComplete: () {
// print('Countdown Ended');
// },
// ),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -60.0, 0.0),
// child: Divider(
// color: Colors.grey[500],
// thickness: 0.7,
// ),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -50.0, 0.0),
// child: Text("Requested date:",
// style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -30.0, 0.0),
// child: Text(
// DateUtil.getDateFormatted(
// widget.pendingERRequestHistoryList.arrivalTime),
// style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, -20.0, 0.0),
// padding: EdgeInsets.all(7.0),
// decoration: BoxDecoration(
// shape: BoxShape.rectangle,
// borderRadius: BorderRadius.all(Radius.circular(5)),
// color: Colors.red[800],
// ),
// margin: EdgeInsets.only(top: 5.0, bottom: 5.0),
// child: Text(widget.pendingERRequestHistoryList.stringCallStatus,
// style: TextStyle(fontSize: 14.0, color: Colors.white)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, 0.0, 0.0),
// child: Divider(
// color: Colors.grey[500],
// thickness: 0.7,
// ),
// ),
// Container(
// alignment: Alignment.center,
// transform: Matrix4.translationValues(0.0, 10.0, 0.0),
// child: Text(
// "Your turn is after " +
// widget.pendingERRequestHistoryList.patCount.toString() +
// " Patients",
// style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
// ),
// Container(
// transform: Matrix4.translationValues(0.0, 110.0, 0.0),
// alignment: Alignment.bottomCenter,
// width: MediaQuery.of(context).size.width,
// child: ButtonTheme(
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10.0),
// ),
// minWidth: MediaQuery.of(context).size.width,
// height: 45.0,
// child: RaisedButton(
// color: Colors.red[800],
// textColor: Colors.white,
// elevation: 0,
// disabledTextColor: Colors.white,
// disabledColor: new Color(0xFFbcc2c4),
// onPressed: () {
// cancelLiveCareRequest();
// },
// child: Text(TranslationBase.of(context).cancel,
// style: TextStyle(fontSize: 18.0)),
// ),
// ),
// ),
// ],
// ),
); );
} }
cancelLiveCareRequest() { cancelLiveCareRequest() {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service.cancelLiveCareRequest(widget.pendingERRequestHistoryList.vCID, context).then((res) {
.cancelLiveCareRequest(widget.pendingERRequestHistoryList.vCID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast( AppToast.showSuccessToast(message: "LiveCare request cancelled successfully");
message: "LiveCare request cancelled successfully");
widget.getLiveCareHistory(); widget.getLiveCareHistory();
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);

@ -21,7 +21,7 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionsViewModel>( return BaseView<PrescriptionsViewModel>(
onModelReady: (model) => model.getPrescriptionReportDetailsRC(), onModelReady: (model) => model.getPrescriptionReportDetailsRC(prescriptionsOrder.iD, projectViewModel.user.patientID),
builder: (_, model, widget) { builder: (_, model, widget) {
int status = prescriptionsOrder.statusId; int status = prescriptionsOrder.statusId;
String _statusDisp = prescriptionsOrder.statusText; String _statusDisp = prescriptionsOrder.statusText;

@ -22,33 +22,34 @@ class DetailsInfo extends StatelessWidget {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Container( // Container(
child: Texts( // child: Texts(
TranslationBase.of(context) // TranslationBase.of(context)
.description, // .description,
fontSize: 17, // fontSize: 17,
color: Colors.grey, // color: Colors.grey,
), // ),
), // ),
// SizedBox(
// height: 10,
// ),
// Divider(height: 1, color: Colors.grey),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Divider(height: 1, color: Colors.grey),
SizedBox(
height: 15,
),
Container( Container(
child: Texts( margin: EdgeInsets.only(left: 10, right: 10),
child: Text(
projectViewModel.isArabic projectViewModel.isArabic
? product.fullDescriptionn ? product.fullDescriptionn
: product : product
.fullDescription ?? .fullDescription ??
"", "",
fontSize: 16, style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.56),
), ),
), ),
SizedBox( SizedBox(
height: 20, height: 60,
), ),
]), ]),
); );

@ -10,6 +10,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -79,10 +80,11 @@ class _FooterWidgetState extends State<FooterWidget> {
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Text( child: Texts(
TranslationBase.of(context).quantity, TranslationBase.of(context).productQuantity,
style: TextStyle( fontSize: 15,
fontSize: 15, fontWeight: FontWeight.bold), fontWeight: FontWeight.bold,
color: Color(0xFF575757)
), ),
), ),
InkWell( InkWell(
@ -144,7 +146,7 @@ class _FooterWidgetState extends State<FooterWidget> {
), ),
) )
: Container( : Container(
height: 20, height: 10,
), ),
Container( Container(
height: 58, height: 58,
@ -164,23 +166,25 @@ class _FooterWidgetState extends State<FooterWidget> {
AppText( AppText(
TranslationBase.of(context).productQuantity, TranslationBase.of(context).productQuantity,
fontSize: 10, fontSize: 10,
fontWeight: FontWeight.w600,
), ),
Row( Row(
children: [ children: [
AppText( AppText(
widget.quantity.toString(), widget.quantity.toString(),
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
SizedBox( SizedBox(
width: 20, width: 20,
), ),
Icon(Icons.keyboard_arrow_down,color: Color(0xFF2E303A),size: 25,) Icon(
Icons.keyboard_arrow_down,
color: Color(0xFF2E303A),
size: 25,
)
], ],
), ),
], ],
), ),
SizedBox( SizedBox(
@ -216,10 +220,11 @@ class _FooterWidgetState extends State<FooterWidget> {
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).addToCart.toUpperCase(), label: TranslationBase.of(context).addToCart,
disabled: (!widget.isAvailable && widget.quantity > 0) || disabled: (!widget.isAvailable && widget.quantity > 0) ||
widget.quantity > widget.quantityLimit || widget.quantity > widget.quantityLimit ||
widget.item.isRx, widget.item.isRx,
fontSize: 16,
onTap: () async { onTap: () async {
if (!authenticatedUserObject.isLogin) { if (!authenticatedUserObject.isLogin) {
login(); login();
@ -232,7 +237,7 @@ class _FooterWidgetState extends State<FooterWidget> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
borderColor: Color(0xFF4CAF50).withOpacity(0.7), borderColor: Color(0xFF4CAF50).withOpacity(0.7),
borderRadius: 6, borderRadius: 6,
color: Color(0xFF5AB145).withOpacity(0.7), color: Color(0xFF535353),
), ),
), ),
SizedBox( SizedBox(
@ -241,7 +246,8 @@ class _FooterWidgetState extends State<FooterWidget> {
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).buyNow.toUpperCase(), label: TranslationBase.of(context).buyNow,
fontSize: 16,
disabled: (!widget.isAvailable && widget.quantity > 0) || disabled: (!widget.isAvailable && widget.quantity > 0) ||
(widget.quantity > widget.quantityLimit) || (widget.quantity > widget.quantityLimit) ||
widget.item.isRx, widget.item.isRx,
@ -263,7 +269,7 @@ class _FooterWidgetState extends State<FooterWidget> {
widget.quantity > widget.quantityLimit || widget.quantity > widget.quantityLimit ||
widget.item.isRx widget.item.isRx
? Color(0xFF535353).withOpacity(0.7) ? Color(0xFF535353).withOpacity(0.7)
: Colors.grey[800], : Color(0xFF5AB145),
), ),
), ),
], ],

@ -136,7 +136,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
if(model.isStockAvailable!= null && !model.isStockAvailable) if(model.isStockAvailable!= null && !model.isStockAvailable)
Container( Container(
height: MediaQuery.of(context).size.height * .40, height: MediaQuery.of(context).size.height * .40,
color: Colors.white.withOpacity(0.75), color: Colors.white.withOpacity(0.6),
// child: AppText("Out of Stock"), // child: AppText("Out of Stock"),
), ),
if(model.isStockAvailable!= null && !model.isStockAvailable) if(model.isStockAvailable!= null && !model.isStockAvailable)
@ -150,7 +150,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
// color: Colors.white.withOpacity(0.75), // color: Colors.white.withOpacity(0.75),
child: RotationTransition( child: RotationTransition(
turns: new AlwaysStoppedAnimation(310 / 360), turns: new AlwaysStoppedAnimation(310 / 360),
child: AppText(TranslationBase.of(context).productOutOfStock ,color:Color(0xFF000000).withOpacity(0.1),fontSize: projectViewModel.isArabic?40: 50, fontWeight: FontWeight.bold ,)), child: AppText(TranslationBase.of(context).productOutOfStock ,color:Color(0xFF000000).withOpacity(0.19),fontSize: projectViewModel.isArabic?40: 50, fontWeight: FontWeight.bold ,)),
), ),
), ),
), ),
@ -233,7 +233,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
}, },
child: Text( child: Text(
TranslationBase.of(context).details, TranslationBase.of(context).details,
style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14), style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.84),
), ),
color: Colors.white, color: Colors.white,
), ),
@ -264,7 +264,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
}, },
child: Text( child: Text(
TranslationBase.of(context).reviews, TranslationBase.of(context).reviews,
style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14), style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.84),
), ),
color: Colors.white, color: Colors.white,
), ),
@ -294,7 +294,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
: null, : null,
child: Text( child: Text(
TranslationBase.of(context).availability, TranslationBase.of(context).availability,
style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14), style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.84),
), ),
color: Colors.white, color: Colors.white,
), ),

@ -81,13 +81,14 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
// regular: true, // regular: true,
fontSize: 17, fontSize: 17,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing:-0.68
// textAlign: TextAlign.center, // textAlign: TextAlign.center,
)), )),
], ],
)) ))
: Container(), : Container(),
FractionallySizedBox( FractionallySizedBox(
widthFactor: 0.95, widthFactor: 0.93,
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -105,18 +106,23 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
), ),
color: getStatusBackgroundColor(), color: getStatusBackgroundColor(),
borderRadius: BorderRadius.circular(30.0)), borderRadius: BorderRadius.circular(30.0)),
child: Text( // child: Text(
widget.stockAvailability, // widget.stockAvailability,
style: TextStyle( // style: TextStyle(
fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
fontSize: 11, // fontSize: 11,
color: Color(0xffFFFFFF), // color: Color(0xffFFFFFF),
), // ),
//color: widget.isStockAvailable ? Colors.white : Colors.red, // color: getStatusBackgroundColor(),
), // borderRadius: BorderRadius.circular(30.0)),
child: Text(
widget.stockAvailability,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 11, color: Color(0xffFFFFFF),letterSpacing:-0.44)),
//color: widget.isStockAvailable ? Colors.white : Colors.red,
), ),
// SizedBox(width: 20), // SizedBox(width: 20),
if (widget.authenticatedUserObject.isLogin) if (
widget.authenticatedUserObject.isLogin)
widget.stockAvailability != null && widget.stockAvailability != null &&
!widget.isStockAvailable && !widget.isStockAvailable &&
widget.customerId != null widget.customerId != null
@ -202,9 +208,9 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
), ),
Padding( Padding(
padding: padding:
const EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 15), const EdgeInsets.only(left: 8, right: 8, top: 1, bottom: 12),
child: Container( child: Container(
margin: EdgeInsets.only(left: 5, right: 5), margin: EdgeInsets.only(left: 10, right: 10),
child: Align( child: Align(
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic
? Alignment.topRight ? Alignment.topRight
@ -213,7 +219,10 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
projectViewModel.isArabic projectViewModel.isArabic
? widget.item.namen ? widget.item.namen
: widget.item.name, : widget.item.name,
style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16), style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16,
letterSpacing: -0.96),
), ),
), ),
), ),
@ -221,7 +230,7 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
Padding( Padding(
padding: const EdgeInsets.only(left: 8, right: 8), padding: const EdgeInsets.only(left: 8, right: 8),
child: Container( child: Container(
margin: EdgeInsets.only(left: 5, right: 5), margin: EdgeInsets.only(left: 10, right: 10),
child: Align( child: Align(
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic
? Alignment.topRight ? Alignment.topRight
@ -230,7 +239,10 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
TranslationBase.of(context).sar + TranslationBase.of(context).sar +
" " + " " +
widget.item.price.toString(), widget.item.price.toString(),
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 19), style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 19,
letterSpacing: -0.76),
), ),
), ),
), ),
@ -240,6 +252,7 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
child: Row( child: Row(
children: [ children: [
Container( Container(
margin: EdgeInsets.only(left: 8, right: 8),
child: Align( child: Align(
alignment: Alignment.bottomLeft, alignment: Alignment.bottomLeft,
child: Row( child: Row(
@ -256,16 +269,16 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
emptyIcon: Icons.star_border, emptyIcon: Icons.star_border,
), ),
SizedBox( SizedBox(
width: 10, width: 5,
), ),
// Texts( // Texts(
// "${widget.item.approvedRatingSum}", // "${widget.item.approvedRatingSum}",
// fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
// fontSize: 12, // fontSize: 12,
// ), // ),
SizedBox( // SizedBox(
width: 30, // width: 30,
), // ),
Text( Text(
"(${widget.item.approvedTotalReviews}${TranslationBase.of(context).review})", "(${widget.item.approvedTotalReviews}${TranslationBase.of(context).review})",
style: TextStyle( style: TextStyle(
@ -291,7 +304,7 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
), ),
), ),
SizedBox( SizedBox(
height: 30, height: 20,
), ),
], ],
), ),

@ -41,8 +41,8 @@ class ReviewsInfo extends StatelessWidget {
// .reviews[index].customerId // .reviews[index].customerId
// .toString(), // .toString(),
style: TextStyle( style: TextStyle(
fontSize: 17, fontSize: 14,
color: Colors.grey, color: Colors.black,
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),
), ),
), ),
@ -83,10 +83,10 @@ class ReviewsInfo extends StatelessWidget {
), ),
); );
}, },
) )
: Container( : Container(
padding: EdgeInsets.fromLTRB(15,15,15,20), padding: EdgeInsets.fromLTRB(15,15,15,20),
margin: EdgeInsets.only(bottom: 20), margin: EdgeInsets.only(bottom: 40),
alignment: Alignment.center, alignment: Alignment.center,
child: Text( child: Text(
TranslationBase.of(context).noReviewsAvailable, TranslationBase.of(context).noReviewsAvailable,

@ -1,15 +1,20 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class IconWithBg extends StatelessWidget { class IconWithBg extends StatelessWidget {
final IconData icon; final IconData icon;
final Color color; final Color color;
final Function onPress; final Function onPress;
final bool hasPadding;
const IconWithBg({Key key, this.icon, this.color, this.onPress}) IconWithBg(
{Key key, this.icon, this.color, this.onPress, this.hasPadding = false})
: super(key: key); : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container( return Container(
width: 40, width: 40,
height: 40, height: 40,
@ -18,12 +23,21 @@ class IconWithBg extends StatelessWidget {
borderRadius: BorderRadius.circular(30), borderRadius: BorderRadius.circular(30),
), ),
child: Center( child: Center(
child: IconButton( child: Padding(
icon: Icon(icon, size: 20,), padding: EdgeInsets.only(
color: color, left: !projectViewModel.isArabic ? (hasPadding ? 4 : 0) : 0,
onPressed: () async { right: projectViewModel.isArabic ? (hasPadding ? 4 : 0) : 0
onPress(); ),
}, child: IconButton(
icon: Icon(
icon,
size: 20,
),
color: color,
onPressed: () async {
onPress();
},
),
), ),
)); ));
} }

@ -3,7 +3,6 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/cart-order-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
@ -57,10 +56,12 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
// mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
IconWithBg( IconWithBg(
icon: Icons.arrow_back_ios, icon: Icons.arrow_back_ios,
hasPadding: true,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
onPress: () { onPress: () {
Navigator.pop(context); Navigator.pop(context);

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/TestPage.dart'; import 'package:diplomaticquarterapp/pages/TestPage.dart';
import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/login/confirm-login.dart'; import 'package:diplomaticquarterapp/pages/login/confirm-login.dart';
import 'package:diplomaticquarterapp/pages/login/forgot-password.dart'; import 'package:diplomaticquarterapp/pages/login/forgot-password.dart';
@ -51,6 +52,7 @@ const String TEST_PAGE = 'test-page';
const String OPENTOK_CALL_PAGE = 'OPENTOK_CALL_PAGE'; const String OPENTOK_CALL_PAGE = 'OPENTOK_CALL_PAGE';
const String CART_ORDER_PAGE = 'cart-order-page'; const String CART_ORDER_PAGE = 'cart-order-page';
const String CALL_PAGE = 'CALL_PAGE'; const String CALL_PAGE = 'CALL_PAGE';
const String INCOMING_CALL_PAGE = 'INCOMING_CALL_PAGE';
const String HEALTH_WEATHER = 'health-weather'; const String HEALTH_WEATHER = 'health-weather';
const APP_UPDATE = 'app-update'; const APP_UPDATE = 'app-update';
@ -80,6 +82,7 @@ var routes = {
SETTINGS: (_) => Settings(), SETTINGS: (_) => Settings(),
CART_ORDER_PAGE: (_) => CartOrderPage(), CART_ORDER_PAGE: (_) => CartOrderPage(),
CALL_PAGE: (_) => CallPage(), CALL_PAGE: (_) => CallPage(),
INCOMING_CALL_PAGE: (_) => IncomingCall(),
OPENTOK_CALL_PAGE: (_) => OpenTokConnectCallPage( OPENTOK_CALL_PAGE: (_) => OpenTokConnectCallPage(
apiKey: '46209962', apiKey: '46209962',
sessionId: '1_MX40NjIwOTk2Mn5-MTYzNDY0ODM3NDY2Nn5PcnpnNGM0R1Q3ODZ6UXlFQ01lMDF5YWJ-fg', sessionId: '1_MX40NjIwOTk2Mn5-MTYzNDY0ODM3NDY2Nn5PcnpnNGM0R1Q3ODZ6UXlFQ01lMDF5YWJ-fg',

@ -4,6 +4,8 @@ class NavigationService {
final GlobalKey<NavigatorState> navigatorKey = final GlobalKey<NavigatorState> navigatorKey =
new GlobalKey<NavigatorState>(); new GlobalKey<NavigatorState>();
static NavigationService instance = NavigationService();
Future<dynamic> navigateTo(String routeName) { Future<dynamic> navigateTo(String routeName) {
return navigatorKey.currentState.pushNamed(routeName); return navigatorKey.currentState.pushNamed(routeName);
} }

@ -2801,6 +2801,9 @@ class TranslationBase {
String get points => localizedValues["points"][locale.languageCode]; String get points => localizedValues["points"][locale.languageCode];
String get availableBalance => localizedValues["availableBalance"][locale.languageCode]; String get availableBalance => localizedValues["availableBalance"][locale.languageCode];
String get ordersDashboard => localizedValues["ordersDashboard"][locale.languageCode]; String get ordersDashboard => localizedValues["ordersDashboard"][locale.languageCode];
String get requestedDateLiveCare => localizedValues["requestedDateLiveCare"][locale.languageCode];
String get yourTurn => localizedValues["yourTurn"][locale.languageCode];
String get patients => localizedValues["patients"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -30,7 +30,7 @@ class SecondaryButton extends StatefulWidget {
this.noBorderRadius = false, this.noBorderRadius = false,
this.borderRadius, this.borderRadius,
this.disableColor, this.disableColor,
this.fontWeight}) this.fontWeight, this.fontSize})
: super(key: key); : super(key: key);
final String label; final String label;
@ -47,6 +47,7 @@ class SecondaryButton extends StatefulWidget {
final double borderRadius; final double borderRadius;
final Color disableColor; final Color disableColor;
final FontWeight fontWeight; final FontWeight fontWeight;
final double fontSize;
@override @override
@ -247,7 +248,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
widget.label, widget.label,
style: TextStyle( style: TextStyle(
color: widget.textColor, color: widget.textColor,
fontSize: widget.small ? 12.0 : 14.0, fontSize: widget.small ? 12.0 : widget.fontSize??14.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: projectViewModel.isArabic fontFamily: projectViewModel.isArabic
? 'Cairo' ? 'Cairo'

@ -28,15 +28,15 @@ var _InAppBrowserOptions = InAppBrowserClassOptions(
class MyInAppBrowser extends InAppBrowser { class MyInAppBrowser extends InAppBrowser {
_PAYMENT_TYPE paymentType; _PAYMENT_TYPE paymentType;
// static String SERVICE_URL = static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT '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 = static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT '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 = // static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';

@ -253,7 +253,7 @@ class productTile extends StatelessWidget {
: Container(), : Container(),
// this.isOrderDetails == true && model.order[0].orderStatusId == 30? // this.isOrderDetails == true && model.order[0].orderStatusId == 30?
if (status == 30 && this.isOrderDetails == true) if (status == 30 || status == 997 && this.isOrderDetails == true)
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,

@ -48,6 +48,7 @@ class PickupLocationFromMap extends StatelessWidget {
autocompleteLanguage: projectViewModel.currentLanguage, autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true, enableMapTypeButton: true,
selectInitialPosition: true, selectInitialPosition: true,
region: "SA",
onPlacePicked: (PickResult result) { onPlacePicked: (PickResult result) {
print(result.adrAddress); print(result.adrAddress);
onPick(result); onPick(result);

@ -35,6 +35,9 @@ dependencies:
#chart #chart
fl_chart: ^0.12.3 fl_chart: ^0.12.3
#Camera Preview
camera: ^0.7.0+4
# Permissions # Permissions
permission_handler: ^5.1.0+2 permission_handler: ^5.1.0+2

Loading…
Cancel
Save