Incoming call & LiveCare pending UI revamped

merge-requests/552/head
haroon amjad 3 years ago
parent a46677f98e
commit cf27c3e796

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

@ -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/';

@ -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": "مرضي"},
};

@ -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<MyApp> {
AppUpdateInfo _updateInfo;
final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();
Future<void> checkForUpdate() async {
InAppUpdate.checkForUpdate().then((info) {
if (info.updateAvailable) {
@ -112,7 +114,7 @@ class _MyApp extends State<MyApp> {
// ],
navigatorKey: locator<NavigationService>().navigatorKey,
showSemanticsDebugger: false,
title: 'Diplomatic Quarter App',
title: 'Dr. AlHabib',
locale: projectProvider.appLocal,
localizationsDelegates: [
TranslationBaseDelegate(),

@ -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<LandingPage> with WidgetsBindingObserver {
if (message.containsKey('data')) {
LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
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')) {

@ -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<IncomingCall> with SingleTickerProviderSt
AnimationController _animationController;
final player = AudioPlayer();
CameraController _controller;
Future<void> _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<IncomingCall> with SingleTickerProviderSt
void dispose() {
_animationController.dispose();
player.stop();
_controller.dispose();
disposeAudioResources();
super.dispose();
}
@ -48,118 +58,279 @@ class _IncomingCallState extends State<IncomingCall> 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<void>(
future: _initializeControllerFuture,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
return Stack(
alignment: FractionalOffset.center,
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)),
),
],
),
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: <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,
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: <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 {
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();

@ -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<LiveCarePendingRequest> {
@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: <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,
),
),
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: <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() {
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);

@ -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',

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

@ -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<TranslationBase> {

@ -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=';

@ -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

Loading…
Cancel
Save