From cf27c3e796c40393aa3ed77d95a1324e17008122 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Tue, 23 Nov 2021 17:41:00 +0300 Subject: [PATCH] Incoming call & LiveCare pending UI revamped --- assets/images/new/logo.png | Bin 0 -> 6505 bytes lib/config/config.dart | 4 +- lib/config/localized_values.dart | 4 +- lib/main.dart | 6 +- lib/pages/landing/landing_page.dart | 12 + lib/pages/livecare/incoming_call.dart | 367 +++++++++++++----- .../widgets/LiveCarePendingRequest.dart | 287 ++++++++------ lib/routes.dart | 3 + lib/uitl/navigation_service.dart | 2 + lib/uitl/translations_delegate_base.dart | 3 + lib/widgets/in_app_browser/InAppBrowser.dart | 12 +- pubspec.yaml | 3 + 12 files changed, 483 insertions(+), 220 deletions(-) create mode 100644 assets/images/new/logo.png diff --git a/assets/images/new/logo.png b/assets/images/new/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..29719b35936faa70f760fbfde6456629ac401f29 GIT binary patch literal 6505 zcmbVR2{=@3`#+XsOEZxOHHL(2Gqy~P?0Z7ith14I24l-Ik}M@#mbBPqi!6z($(l8y zNVX^@JIT&}v|aD_|K4x8zPYY5=RD8zyZ8IKpZi=VTu)d15aV%1000hYYN!}c?i2eL zJssuWD>6fea$_K9n7IQ06YKs(1>Aqg0RRUk>3X4bM#Jrse6f^*w zzu-+kVH|Np2pVT+?}CIbRMkNt_E;p;MEat{MS?Q!s=dZFH{9iGx`vo*ju<&C^nyI( zyf=cvz!^tGLA;%vT-*`fNazo~2+H&Rv^W&<1448}LKXJ~LQF5}L6q@sIEb{Ej3@>s zbrvEkCkB&|l8}@UfxsnTa^eza#bJ`75-@~>3_@BK^6LksNOQy5A`Dd2e#xSYkkG3{ zA^{;T?&akr<|QeHce4|R$;nZ8z{TNkQ3^uT-N%K9@)mV*=ljh;1?P@&vnLSk@h*^k zjwm$VgNTGuH2rCUGvN?r z3(=i|h5f-2uHuP!_pA7S!TQhgKM0_>_Tt4qGX7Qj!Mdjd<5~7kgISdLWi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gj z!KY7DIgdXvNw9wz3_J`$KIR4b7f0S)ZaYhsVi8Gax+j36En3*YFmIJdyG}B3%CNyT z1dJF00ln)m4zHfiH!!zN?g$|bn(XyFD&hKJK4lKXBxPp2pcjCsDNIXRgsCrh!Fc5bWhF_2M2zwzBi%-fG(Z P#}G|bU6n#5o1p&#+wM@@ literal 0 HcmV?d00001 diff --git a/lib/config/config.dart b/lib/config/config.dart index c4fabca6..92cafb4b 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -15,8 +15,8 @@ const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs // const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 94e7349f..3caf6c6b 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1532,6 +1532,7 @@ const Map localizedValues = { "rateDoctorAppo": {"en": "Rate DR & Appointment", "ar": "تقييم الطبيب والموعد"}, "invoice": {"en": "Invoice", "ar": "الفاتورة"}, "requestedDate": {"en": "Req Date", "ar": "التاريخ "}, + "requestedDateLiveCare": {"en": "Requested Date: ", "ar": "التاريخ: "}, "callDuration": {"en": "Call Duration", "ar": "مدة الاتصال"}, "alreadyRated": {"en": "This appointment has been previously evaluated.", "ar": "تم تقييم هذا الموعد مسبقاً"}, "insuranceCompany": {"en": "Insurance Company", "ar": "شركة تأمين"}, @@ -1724,7 +1725,6 @@ const Map localizedValues = { "dietModerate":{"en":"Moderate Carb","ar":"حمية معتدلة الكربوهيدرات"}, "dietUSDA":{"en":"USDA Guidelines","ar":"ارشادات وزارة الزراعة الأمريكية"}, "dietZone":{"en":"Zone Diet","ar":"حمية زون"}, - "Protein": {"en": "Protein", "ar": "بروتين"}, "Cals": {"en": "Cals", "ar": "كالس"}, "gramsPerDay": {"en": "Grams Per Day", "ar": "غرام في اليوم"}, @@ -1734,4 +1734,6 @@ const Map localizedValues = { "points": {"en": "Points", "ar": "نقاط"}, "availableBalance": {"en": "Available Balance", "ar": "الرصيد المتوفر"}, "ordersDashboard": {"en": "My Orders", "ar": "طلباتي"}, + "yourTurn": {"en": "your turn is after", "ar": "دورك بعد"}, + "patients": {"en": "patients", "ar": "مرضي"}, }; diff --git a/lib/main.dart b/lib/main.dart index 50a7e1a0..15e91291 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -27,7 +27,7 @@ void main() async { WidgetsFlutterBinding.ensureInitialized(); FirebaseApp defaultApp = await Firebase.initializeApp(); - setupLocator(); + await setupLocator(); runApp(MyApp()); } @@ -39,6 +39,8 @@ class MyApp extends StatefulWidget { class _MyApp extends State { AppUpdateInfo _updateInfo; + final GlobalKey navigatorKey = GlobalKey(); + Future checkForUpdate() async { InAppUpdate.checkForUpdate().then((info) { if (info.updateAvailable) { @@ -112,7 +114,7 @@ class _MyApp extends State { // ], navigatorKey: locator().navigatorKey, showSemanticsDebugger: false, - title: 'Diplomatic Quarter App', + title: 'Dr. AlHabib', locale: projectProvider.appLocal, localizationsDelegates: [ TranslationBaseDelegate(), diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index db41840d..aeb0af07 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -26,6 +26,7 @@ import 'package:diplomaticquarterapp/uitl/SignalRUtil.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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/widgets/bottom_navigation/bottom_nav_bar.dart'; import 'package:diplomaticquarterapp/widgets/buttons/floatingActionButton.dart'; @@ -422,6 +423,17 @@ class _LandingPageState extends State with WidgetsBindingObserver { if (message.containsKey('data')) { LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); LandingPage.isOpenCallPage = true; + // Future.delayed(Duration(seconds: 3), () { + // Navigator.push(locator().navigatorKey.currentContext, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))); + NavigationService.instance.navigateTo(INCOMING_CALL_PAGE); + // }); + // if (!isPageNavigated) { + // isPageNavigated = true; + // Navigator.push(locator().navigatorKey.currentContext, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))); + // .then((value) { + // isPageNavigated = false; + // }); + // } } if (message.containsKey('notification')) { diff --git a/lib/pages/livecare/incoming_call.dart b/lib/pages/livecare/incoming_call.dart index 7e586942..b02676e0 100644 --- a/lib/pages/livecare/incoming_call.dart +++ b/lib/pages/livecare/incoming_call.dart @@ -1,9 +1,14 @@ +import 'dart:ui'; + +import 'package:camera/camera.dart'; import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; import 'package:diplomaticquarterapp/models/LiveCare/room_model.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/widgets/platform_exception_alert_dialog.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:flutter/material.dart'; import 'package:just_audio/just_audio.dart'; @@ -21,10 +26,14 @@ class _IncomingCallState extends State with SingleTickerProviderSt AnimationController _animationController; final player = AudioPlayer(); + CameraController _controller; + Future _initializeControllerFuture; + bool isCameraReady = false; @override void initState() { _animationController = AnimationController(vsync: this, duration: Duration(milliseconds: 500)); + isCameraReady = false; WidgetsBinding.instance.addPostFrameCallback((_) => _runAnimation()); @@ -39,6 +48,7 @@ class _IncomingCallState extends State with SingleTickerProviderSt void dispose() { _animationController.dispose(); player.stop(); + _controller.dispose(); disposeAudioResources(); super.dispose(); } @@ -48,118 +58,279 @@ class _IncomingCallState extends State with SingleTickerProviderSt return AppScaffold( isShowAppBar: false, isShowDecPage: false, - body: SafeArea( - child: Container( - decoration: BoxDecoration(color: Colors.grey[700]), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - mainAxisSize: MainAxisSize.max, + body: FutureBuilder( + future: _initializeControllerFuture, + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.done) { + return Stack( + alignment: FractionalOffset.center, children: [ - 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: [ - 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)), - ), - ], - ), + new Positioned.fill( + child: new AspectRatio(aspectRatio: _controller.value.aspectRatio, child: new CameraPreview(_controller)), ), - Container( - margin: EdgeInsets.only(top: 100.0), - alignment: Alignment.center, - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - 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, + new Positioned.fill( + child: new ClipRect( + child: new BackdropFilter( + filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), + child: new Container( + decoration: new BoxDecoration(color: Colors.grey[800].withOpacity(0.8)), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.max, + children: [ + Container( + margin: const EdgeInsets.all(21.0), + child: Row( + children: [ + Image.asset( + "assets/images/new/logo.png", + height: 70, + width: 70, + ), + 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: [ + 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: [ + // 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: [ + // 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: [ + // 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 { + 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(); for (int i = 0; i < 100; i++) { await _animationController.forward(); diff --git a/lib/pages/livecare/widgets/LiveCarePendingRequest.dart b/lib/pages/livecare/widgets/LiveCarePendingRequest.dart index 2c47b3c7..4f0a86fc 100644 --- a/lib/pages/livecare/widgets/LiveCarePendingRequest.dart +++ b/lib/pages/livecare/widgets/LiveCarePendingRequest.dart @@ -1,18 +1,22 @@ 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/services/livecare_services/livecare_provider.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.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/my_rich_text.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class LiveCarePendingRequest extends StatefulWidget { ErRequestHistoryList pendingERRequestHistoryList; final Function getLiveCareHistory; - LiveCarePendingRequest( - {@required this.getLiveCareHistory, this.pendingERRequestHistoryList}); + LiveCarePendingRequest({@required this.getLiveCareHistory, this.pendingERRequestHistoryList}); @override _LiveCarePendingRequestState createState() => _LiveCarePendingRequestState(); @@ -27,136 +31,197 @@ class _LiveCarePendingRequestState extends State { @override Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); return Container( - decoration: BoxDecoration( - border: Border.all(color: Colors.grey[300]), - borderRadius: BorderRadius.circular(10), - color: Colors.white, - shape: BoxShape.rectangle, - ), - margin: EdgeInsets.all(15.0), + margin: EdgeInsets.fromLTRB(21, 21, 21, 12), padding: EdgeInsets.all(10.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, - 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, - ), - ), + children: [ 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, + width: MediaQuery.of(context).size.width, + decoration: cardRadius(15.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + padding: const EdgeInsets.fromLTRB(16, 21, 16, 23), + child: Text(TranslationBase.of(context).waitingTime, style: TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600, letterSpacing: -0.64)), + ), + Container( + height: MediaQuery.of(context).size.height * 0.25, + transform: Matrix4.translationValues(0.0, -10.0, 0.0), + alignment: Alignment.center, + child: CircularCountDownTimer( + duration: widget.pendingERRequestHistoryList.watingtimeInteger * 60, + width: MediaQuery.of(context).size.width / 2, + height: MediaQuery.of(context).size.height / 2, + color: Colors.white, + fillColor: CustomColors.green, + strokeWidth: 7.0, + textStyle: TextStyle(fontSize: 32.0, color: Color(0xff2E303A), fontWeight: FontWeight.w400), + isReverse: true, + isTimerTextShown: true, + onComplete: () { + print('Countdown Ended'); + }, + ), + ), + ], ), ), 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, + margin: const EdgeInsets.fromLTRB(0, 12, 0, 0), + padding: const EdgeInsets.fromLTRB(16, 21, 16, 12), 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)), - ), + decoration: cardRadius(15.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + decoration: cardRadius(15.0, color: Color(0xffCC9B14)), + padding: const EdgeInsets.all(5.0), + child: Text(widget.pendingERRequestHistoryList.stringCallStatus, style: TextStyle(fontSize: 10.0, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4)), + ), + Container( + padding: const EdgeInsets.all(5.0), + child: MyRichText(TranslationBase.of(context).requestedDateLiveCare, + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.pendingERRequestHistoryList.arrivalTime)), projectViewModel.isArabic), + ), + Container( + padding: const EdgeInsets.all(5.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: [ + // 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() { LiveCareService service = new LiveCareService(); GifLoaderDialogUtils.showMyDialog(context); - service - .cancelLiveCareRequest(widget.pendingERRequestHistoryList.vCID, context) - .then((res) { + service.cancelLiveCareRequest(widget.pendingERRequestHistoryList.vCID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - AppToast.showSuccessToast( - message: "LiveCare request cancelled successfully"); + AppToast.showSuccessToast(message: "LiveCare request cancelled successfully"); widget.getLiveCareHistory(); }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); diff --git a/lib/routes.dart b/lib/routes.dart index 9525bc96..ab92ee53 100644 --- a/lib/routes.dart +++ b/lib/routes.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/TestPage.dart'; import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_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/login/confirm-login.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 CART_ORDER_PAGE = 'cart-order-page'; const String CALL_PAGE = 'CALL_PAGE'; +const String INCOMING_CALL_PAGE = 'INCOMING_CALL_PAGE'; const String HEALTH_WEATHER = 'health-weather'; const APP_UPDATE = 'app-update'; @@ -80,6 +82,7 @@ var routes = { SETTINGS: (_) => Settings(), CART_ORDER_PAGE: (_) => CartOrderPage(), CALL_PAGE: (_) => CallPage(), + INCOMING_CALL_PAGE: (_) => IncomingCall(), OPENTOK_CALL_PAGE: (_) => OpenTokConnectCallPage( apiKey: '46209962', sessionId: '1_MX40NjIwOTk2Mn5-MTYzNDY0ODM3NDY2Nn5PcnpnNGM0R1Q3ODZ6UXlFQ01lMDF5YWJ-fg', diff --git a/lib/uitl/navigation_service.dart b/lib/uitl/navigation_service.dart index d4cd426b..3e720dea 100644 --- a/lib/uitl/navigation_service.dart +++ b/lib/uitl/navigation_service.dart @@ -4,6 +4,8 @@ class NavigationService { final GlobalKey navigatorKey = new GlobalKey(); + static NavigationService instance = NavigationService(); + Future navigateTo(String routeName) { return navigatorKey.currentState.pushNamed(routeName); } diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 4a5c8a5d..fb771199 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2799,6 +2799,9 @@ class TranslationBase { String get points => localizedValues["points"][locale.languageCode]; String get availableBalance => localizedValues["availableBalance"][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 { diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index 5ae0d119..158de780 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -28,15 +28,15 @@ var _InAppBrowserOptions = InAppBrowserClassOptions( class MyInAppBrowser extends InAppBrowser { _PAYMENT_TYPE paymentType; - // 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='; diff --git a/pubspec.yaml b/pubspec.yaml index 744929f6..ff6873fc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -35,6 +35,9 @@ dependencies: #chart fl_chart: ^0.12.3 + #Camera Preview + camera: ^0.7.0+4 + # Permissions permission_handler: ^5.1.0+2