Merge branch 'development_new_design_2.0' into Fatima-New-Design

# Conflicts:
#	lib/pages/search_products_page.dart
#	lib/widgets/pharmacy/product_tile.dart
merge-requests/558/head
Fatimah Alshammari 4 years ago
commit a55ca33c1b

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -1086,7 +1086,7 @@ const Map localizedValues = {
"removeFromWishlist": {"en": "Remove From Wishlist", "ar": "احذف للمفضلة"},
"noData": {"en": "There is no data", "ar": "لايوجد بيانات"},
"no_data": {"en": "No data", "ar": "لايوجد بيانات"},
"buyNow": {"en": "buy now", "ar": "إشتري الان"},
"buyNow": {"en": "Buy Now", "ar": "إشتري الان"},
"quantityShortcut": {"en": "QTY", "ar": "كمية"},
"pharmacyServiceTermsCondition": {"en": "I agree with the terms of service and I adhere to them unconditionally", "ar": " موافق على شروط الخدمة وألتزم بها دون قيد أو شرط"},
"Year": {"en": "YEAR", "ar": "السنة"},
@ -1536,6 +1536,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": "شركة تأمين"},
@ -1728,7 +1729,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": "غرام في اليوم"},
@ -1741,4 +1741,6 @@ const Map localizedValues = {
"productOutOfStock": {"en": "Out Of Stock", "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['CreatedBy'] = createdBy;
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 = "";
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -55,7 +55,7 @@ class PrescriptionsService extends BaseService {
prescriptionsOrderListRC.clear();
Map<String, dynamic> body = Map();
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) {
prescriptionsOrderListRC.add(PrescriptionInfoRCModel.fromJson(prescriptionsOrder));
});
@ -69,7 +69,7 @@ class PrescriptionsService extends BaseService {
prescriptionsOrderList.clear();
Map<String, dynamic> body = Map();
// 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) {
prescriptionsOrderList.add(GetCMCAllOrdersResponseModel.fromJson(prescriptionsOrder));
});

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

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

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

@ -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')) {

@ -90,7 +90,9 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
try {
String barcode = result;
GifLoaderDialogUtils.showMyDialog(context);
await BaseAppClient().getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode", onSuccess: (dynamic response, int statusCode) {
await BaseAppClient()
.getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode",
onSuccess: (dynamic response, int statusCode) {
print(response);
var product = PharmacyProduct.fromJson(response["products"][0]);
GifLoaderDialogUtils.hideDialog(context);
@ -100,7 +102,8 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
AppToast.showErrorToast(message: "Product not found");
});
} catch (apiEx) {
AppToast.showErrorToast(message: "Something went wrong, please try again");
AppToast.showErrorToast(
message: "Something went wrong, please try again");
}
} catch (barcodeEx) {}
}

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

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

@ -48,7 +48,7 @@ class _PharmacyPageState extends State<PharmacyPage> {
isMainPharmacyPages: true,
isPharmacy: true,
isShowPharmacyAppbar: true,
backgroundColor: Colors.white,
backgroundColor: Color(0xffFEFEFE),
body: Container(
width: double.infinity,
child: SingleChildScrollView(

@ -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/translations_delegate_base.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:flutter/material.dart';
@ -56,7 +57,15 @@ class _FooterWidgetState extends State<FooterWidget> {
borderRadius: BorderRadius.all(
Radius.circular(0.0),
),
border: Border.all(color: Color(0xFF707070), width: 0),
boxShadow: [
BoxShadow(
color: Color(0xFFCCCCCC),
spreadRadius: 0,
blurRadius: 4,
offset: Offset(2, 2), // changes position of shadow
),
],
// border: Border.all(color: Color(0xFF707070), width: 0),
),
width: double.infinity,
height: quantityUI,
@ -79,10 +88,11 @@ class _FooterWidgetState extends State<FooterWidget> {
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
TranslationBase.of(context).quantity,
style: TextStyle(
fontSize: 15, fontWeight: FontWeight.bold),
child: Texts(
TranslationBase.of(context).productQuantity,
fontSize: 15,
fontWeight: FontWeight.bold,
color: Color(0xFF575757)
),
),
InkWell(
@ -144,7 +154,7 @@ class _FooterWidgetState extends State<FooterWidget> {
),
)
: Container(
height: 20,
height: 10,
),
Container(
height: 58,
@ -164,23 +174,25 @@ class _FooterWidgetState extends State<FooterWidget> {
AppText(
TranslationBase.of(context).productQuantity,
fontSize: 10,
fontWeight: FontWeight.w600,
),
Row(
children: [
AppText(
widget.quantity.toString(),
fontSize: 16,
fontWeight: FontWeight.bold,
),
),
SizedBox(
width: 20,
),
Icon(Icons.keyboard_arrow_down,color: Color(0xFF2E303A),size: 25,)
Icon(
Icons.keyboard_arrow_down,
color: Color(0xFF2E303A),
size: 25,
)
],
),
],
),
SizedBox(
@ -215,11 +227,12 @@ class _FooterWidgetState extends State<FooterWidget> {
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
margin: EdgeInsets.symmetric( vertical: 5.0),
child: SecondaryButton(
label: TranslationBase.of(context).addToCart.toUpperCase(),
disabled: (!widget.isAvailable && widget.quantity > 0) ||
widget.quantity > widget.quantityLimit ||
widget.item.isRx,
label: TranslationBase.of(context).addToCart,
disabled: isAddToCartDisable(),
fontSize: 15,
onTap: () async {
if (!authenticatedUserObject.isLogin) {
login();
@ -230,9 +243,10 @@ class _FooterWidgetState extends State<FooterWidget> {
model: widget.model);
},
fontWeight: FontWeight.w600,
borderColor: Color(0xFF4CAF50).withOpacity(0.7),
borderRadius: 6,
color: Color(0xFF5AB145).withOpacity(0.7),
disableColor:Color(0xFFD6D6D6),
textColor: isAddToCartDisable()?Color(0xFFACACAC):Colors.white,
color: Color(0xFF535353),
),
),
SizedBox(
@ -240,11 +254,13 @@ class _FooterWidgetState extends State<FooterWidget> {
),
Container(
width: MediaQuery.of(context).size.width * 0.35,
margin: EdgeInsets.symmetric( vertical: 5.0),
child: SecondaryButton(
label: TranslationBase.of(context).buyNow.toUpperCase(),
disabled: (!widget.isAvailable && widget.quantity > 0) ||
(widget.quantity > widget.quantityLimit) ||
widget.item.isRx,
label: TranslationBase.of(context).buyNow,
fontSize: 15,
disabled: isBuyNowDisable(),
onTap: () async {
if (!authenticatedUserObject.isLogin) {
login();
@ -255,15 +271,11 @@ class _FooterWidgetState extends State<FooterWidget> {
model: widget.model);
}
},
textColor: isBuyNowDisable()?Color(0xFFACACAC):Colors.white,
fontWeight: FontWeight.w600,
borderColor: Colors.grey[800].withOpacity(0.7),
borderRadius: 6,
disableColor: Colors.grey[700],
color: !widget.isAvailable && widget.quantity > 0 ||
widget.quantity > widget.quantityLimit ||
widget.item.isRx
? Color(0xFF535353).withOpacity(0.7)
: Colors.grey[800],
disableColor: Color(0xFFD6D6D6),
color: Color(0xFF5AB145),
),
),
],
@ -274,6 +286,22 @@ class _FooterWidgetState extends State<FooterWidget> {
);
}
bool isBuyNowDisable(){
return (!widget.isAvailable && widget.quantity > 0) ||
(widget.quantity > widget.quantityLimit) ||
widget.item.isRx;
}
bool isAddToCartDisable(){
return (!widget.isAvailable && widget.quantity > 0) ||
widget.quantity > widget.quantityLimit ||
widget.item.isRx;
}
void setUserValues(value) async {
if (value != null) sharedPref.setObject(IMEI_USER_DATA, value);
}

@ -136,7 +136,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
if(model.isStockAvailable!= null && !model.isStockAvailable)
Container(
height: MediaQuery.of(context).size.height * .40,
color: Colors.white.withOpacity(0.75),
color: Colors.white.withOpacity(0.6),
// child: AppText("Out of Stock"),
),
if(model.isStockAvailable!= null && !model.isStockAvailable)
@ -150,7 +150,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
// color: Colors.white.withOpacity(0.75),
child: RotationTransition(
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 ,)),
),
),
),

@ -1,15 +1,20 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class IconWithBg extends StatelessWidget {
final IconData icon;
final Color color;
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);
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return Container(
width: 40,
height: 40,
@ -18,12 +23,21 @@ class IconWithBg extends StatelessWidget {
borderRadius: BorderRadius.circular(30),
),
child: Center(
child: IconButton(
icon: Icon(icon, size: 20,),
color: color,
onPressed: () async {
onPress();
},
child: Padding(
padding: EdgeInsets.only(
left: !projectViewModel.isArabic ? (hasPadding ? 4 : 0) : 0,
right: projectViewModel.isArabic ? (hasPadding ? 4 : 0) : 0
),
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/product_detail_view_model.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/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
@ -57,10 +56,12 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
// mainAxisAlignment: MainAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconWithBg(
icon: Icons.arrow_back_ios,
hasPadding: true,
color: Color(0xFF2B353E),
onPress: () {
Navigator.pop(context);

@ -79,12 +79,22 @@ class ProductTileItem extends StatelessWidget {
ProjectViewModel projectProvider = Provider.of(context);
return InkWell(
onTap: () => productOnClick(context),
splashColor: Theme.of(context).primaryColor,
child: Container(
margin: EdgeInsets.all(7),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey.shade300, width: 0.5),
borderRadius: BorderRadius.circular(8)),
border: Border.all(color: Colors.grey.shade300, width: 0.2),
borderRadius: BorderRadius.circular(10),
color: Colors.white,
shape: BoxShape.rectangle,
boxShadow: [
BoxShadow(
color: Color(0xffF1F1F1),
spreadRadius: 4,
blurRadius: 5.5,
offset: Offset(0, 3), // changes position of shadow
),
],
),
padding: EdgeInsets.symmetric(horizontal: 4),
width: MediaQuery.of(context).size.width / 2.8,
child: Column(
@ -114,135 +124,131 @@ class ProductTileItem extends StatelessWidget {
width: double.infinity,
height: MediaQuery.of(context).size.width * 0.3,
padding:
EdgeInsets.only(left: 20, right: 20, top: 14, bottom: 14),
EdgeInsets.only(left: 10, right: 10, top: 7, bottom: 3.5),
color: Colors.white,
child: InkWell(
onTap: () {},
child: Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: containerRadiusWithGradientServices(33,
lightColor: Colors.transparent,
darkColor: Colors.transparent),
child: Stack(
children: [
Container(
width: double.infinity,
height: double.infinity,
//clipBehavior: Clip.antiAlias,
// decoration: projectProvider.isArabic
// ? containerBottomRightRadiusWithGradientForAr(0, lightColor: Colors.transparent, darkColor: Colors.transparent)
// : containerBottomRightRadiusWithGradient(0, lightColor: Colors.red, darkColor: CustomColors.green),
child: Stack(
children: [
Container(
margin: EdgeInsets.fromLTRB(0, 0, 0, 0),
alignment: Alignment.center,
child: (item.images != null &&
item.images.length > 0)
? Image.network(
item.images[0].src,
fit: BoxFit.cover,
height: itemHeight / 2,
)
: Image.asset(
"assets/images/no_image.png",
fit: BoxFit.cover,
height: itemHeight / 2,
),
child: Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: containerRadiusWithGradientServices(0.0,
prescriptionRequired: item.rxMessage != null,
isProduct: true,
isEnglish: !projectProvider.isArabic,
lightColor: Colors.transparent,
darkColor: Colors.transparent),
child: Stack(
children: [
Stack(
children: [
Container(
decoration: BoxDecoration(
border: Border.all(
color: Color(0xffF0F0F0), width: 1.0),
borderRadius: BorderRadius.only(
topRight: Radius.circular(
item.rxMessage != null &&
projectProvider.isArabic
? 20
: 8),
bottomLeft: Radius.circular(8),
bottomRight: Radius.circular(8),
topLeft: Radius.circular(item.rxMessage != null &&
!projectProvider.isArabic
? 20
: 8),
),
],
),
),
if (item.rxMessage != null)
projectProvider.isArabic
? Positioned(
right: -16,
top: 2,
child: Transform.rotate(
angle: math.pi / 4,
child: Container(
padding: EdgeInsets.only(
left: 18, right: 18, top: 6, bottom: 3),
color: CustomColors.accentColor,
child: Padding(
padding: EdgeInsets.all(2.0),
child: Text(
"الوصفة\n مطلوبة",
style: TextStyle(
color: Colors.white,
fontSize: 7.5,
height: 0.8,
fontWeight: FontWeight.bold,
letterSpacing: -0.27,
),
),
),
),
margin: EdgeInsets.fromLTRB(0, 0, 0, 0),
alignment: Alignment.center,
child: (item.images != null && item.images.length > 0)
? Padding(
padding: EdgeInsets.all(12.0),
child: Image.network(
item.images[0].src,
fit: BoxFit.cover,
height: itemHeight / 2,
),
)
: Padding(
padding: EdgeInsets.all(8.0),
child: Image.asset(
"assets/images/no_image.png",
fit: BoxFit.cover,
height: itemHeight / 2,
),
),
)
: Positioned(
left: -24,
top: 2,
child: Transform.rotate(
angle: -math.pi / 4,
child: Container(
padding: EdgeInsets.only(
left: 18, right: 18, top: 6, bottom: 3),
color: CustomColors.accentColor,
),
],
),
if (item.rxMessage != null)
projectProvider.isArabic
? Positioned(
right: -16,
top: 2,
child: Transform.rotate(
angle: math.pi / 4,
child: Container(
color: CustomColors.accentColor,
padding: EdgeInsets.only(
left: 18, right: 18, top: 6, bottom: 3),
child: Padding(
padding: EdgeInsets.all(2.0),
child: Text(
"\n E-Prescription \n Is required",
"الوصفة\n مطلوبة",
style: TextStyle(
color: Colors.white,
fontSize: 7.5,
//letterSpacing: -0.27,
height: 1.2,
fontSize: 7.0,
height: 0.8,
fontWeight: FontWeight.w600,
letterSpacing: -0.27,
),
),
),
),
),
],
),
)
: Positioned(
left: -24,
top: 2,
child: Transform.rotate(
angle: -math.pi / 4,
child: Container(
padding: EdgeInsets.only(
left: 18, right: 18, top: 6, bottom: 3),
color: CustomColors.accentColor,
child: Text(
"\n E-Prescription \n Is required",
style: TextStyle(
color: Colors.white,
fontSize: 7.0,
//letterSpacing: -0.27,
height: 1.2,
fontWeight: FontWeight.w600,
),
),
),
),
),
],
),
),
),
// Padding(
// padding: EdgeInsets.fromLTRB(1, 1, 1, 1),
// child: Container(
// width: item.rxMessage != null
// ? MediaQuery.of(context).size.width / 1.0
// : 0,
// padding: EdgeInsets.fromLTRB(8, 2, 8, 2),
// decoration: BoxDecoration(
// color: Color(0xffb23838),
// ),
// child: item.rxMessage != null
// ? Texts(
// projectProvider.isArabic
// ? item.rxMessagen
// : item.rxMessage,
// color: Colors.white,
// regular: true,
// fontSize: 10,
// fontWeight: FontWeight.w400,
// )
// : Texts(""),
// ),
// ),
// SizedBox(height: 4,),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 4.0),
child: Texts(
projectProvider.isArabic ? item.namen : item.name,
regular: true,
fontSize: 12,
fontWeight: FontWeight.w400,
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Container(
height: MediaQuery.of(context).size.height * 0.075,
child: Texts(
projectProvider.isArabic ? item.namen : item.name,
//regular: true,
fontSize: 10,
color: Color(0xff2B353E),
fontWeight: FontWeight.w600,
),
),
),
SizedBox(
height: 7.0,
),
Expanded(
child: Container(
margin: EdgeInsets.symmetric(
@ -251,43 +257,48 @@ class ProductTileItem extends StatelessWidget {
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.end,
//mainAxisAlignment: MainAxisAlignment.end,
children: [
Padding(
padding: const EdgeInsets.only(top: 2, bottom: 2),
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 2),
child: Texts(
"SAR ${item.price}",
fontWeight: FontWeight.w600,
fontSize: 14,
fontWeight: FontWeight.w700,
fontSize: 11,
color: Color(0xff2B353E),
),
),
Row(
children: [
// Expanded(
RatingBar.readOnly(
initialRating: item.approvedRatingSum.toDouble(),
size: 15.0,
filledColor: Color(0xffD02127),
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
Texts(
"(${item.approvedTotalReviews})",
regular: true,
fontSize: 10,
fontWeight: FontWeight.w400,
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 5),
child: Row(
children: [
// Expanded(
RatingBar.readOnly(
initialRating: item.approvedRatingSum.toDouble(),
size: 15.0,
filledColor: Color(0XFFD02127),
emptyColor: Color(0XFFD02127),
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
Texts(
"(${item.approvedTotalReviews})",
regular: true,
fontSize: 10,
fontWeight: FontWeight.w400,
),
SizedBox(
width: 20.0,
),
Icon(
Icons.arrow_forward,
size: 18,
),
SizedBox(
width: 10.0,
),
Icon(
Icons.arrow_forward,
size: 15,
color: Color(0xff2D2F39),
),
// StarRating(
// totalAverage: item.approvedTotalReviews > 0
@ -296,15 +307,16 @@ class ProductTileItem extends StatelessWidget {
// .toDouble()
// : 0,
// forceStars: true),
// ),
],
// ),
],
),
),
],
),
),
),
SizedBox(
height: 5,
height: 1,
),
],
),

@ -4,6 +4,9 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_mod
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
import 'package:diplomaticquarterapp/pages/offers_categorise_page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-activitaion-vida-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lacum-registration-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/lakum-main-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/GridViewCard.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -50,7 +53,7 @@ class _BannerPagerState extends State<BannerPager> {
(item, index) {
return InkWell(
onTap: () {
Navigator.push(context, FadePage(page: OffersCategorisePage()));
bannerNavigator(index);
},
child: Container(
margin: EdgeInsets.symmetric(horizontal: 1.0),
@ -93,4 +96,27 @@ class _BannerPagerState extends State<BannerPager> {
],
));
}
bannerNavigator(index){
switch(index) {
case 1: {
Navigator.push(context, FadePage(page: OffersCategorisePage()));
}
break;
case 2: {
Navigator.push(context, FadePage(page: LakumActivationVidaPage()));
}
break;
case 5: {
Navigator.push(context, FadePage(page: OffersCategorisePage()));
}
break;
default: {
}
break;
}
}
}

@ -29,7 +29,7 @@ class BestSellerWidget extends StatelessWidget {
)),
if (model.state != ViewState.BusyLocal)
Container(
height: MediaQuery.of(context).size.height / 3 + 20,
height: MediaQuery.of(context).size.height / 3 + 1,
child: ListView.builder(
itemBuilder: (ctx, i) => ProductTileItem(
model.bestSellerProduct[i],

@ -31,7 +31,7 @@ class MostViewedWidget extends StatelessWidget {
)),
if (model.state != ViewState.BusyLocal)
Container(
height: MediaQuery.of(context).size.height / 3 + 20,
height: MediaQuery.of(context).size.height / 3 + 1,
child: ListView.builder(
itemBuilder: (ctx, i) => ProductTileItem(
model.mostViewedProducts[i],

@ -31,7 +31,7 @@ class RecentlyViewedWidget extends StatelessWidget {
if (model.state != ViewState.BusyLocal)
Container(
height: model.lastVisitedProducts.length > 0
? MediaQuery.of(context).size.height / 3 + 20
? MediaQuery.of(context).size.height / 3 + 1
: 0,
child: ListView.builder(
itemBuilder: (ctx, i) => ProductTileItem(

@ -18,8 +18,9 @@ class ViewAllHomeWidget extends StatelessWidget {
children: [
Texts(
title,
bold: true,
fontSize: 16,
color: Color(0xff2E303A),
fontWeight: FontWeight.w700,
fontSize: 19,
),
InkWell(
onTap: () {

@ -11,12 +11,14 @@ import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import 'base/base_view.dart';
import 'package:intl/intl.dart' as international;
class SearchProductsPage extends StatefulWidget {
@override
@ -27,6 +29,8 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
final textController = TextEditingController();
final _formKey = GlobalKey<FormState>();
String msg = '';
String validText = "";
bool isTextValid = true;
@override
Widget build(BuildContext context) {
@ -70,16 +74,18 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
msg = TranslationBase.of(context).noResultFound;
},
controller: textController,
// validator: (value) {
// if (value.isEmpty) {
//// return 'please Enter Product Name';
// return TranslationBase.of(context).pleaseEnterProductName;
// }
// return null;
// },
),
// SizedBox(
// width: 10.0,
// ),
// if(!isTextValid)
// AppText( TranslationBase.of(context)
// .noArabicLetters, color: Colors.red,),
// ],
// ),
),
),
SizedBox(
width: 10.0,
),
@ -207,16 +213,27 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
Radius.circular(
6)),
),
child: model.searchList[index].rxMessage != null
child: model.searchList[index]
.rxMessage !=
null
? Texts(
projectProvider.isArabic
? model.searchList[index].rxMessagen
: model.searchList[index].rxMessage,
color: Colors.white,
regular: true,
fontSize: 10,
fontWeight: FontWeight.w400,
): Texts(""),
projectProvider
.isArabic
? model
.searchList[
index]
.rxMessagen
: model
.searchList[
index]
.rxMessage,
color: Colors.white,
regular: true,
fontSize: 10,
fontWeight:
FontWeight.w400,
)
: Texts(""),
// Texts(
// model.searchList[index]
// .rxMessage !=
@ -242,11 +259,16 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(projectProvider.isArabic
? model.searchList[index].namen
:model.searchList[index].name,
Texts(
projectProvider.isArabic
? model
.searchList[index]
.namen
: model
.searchList[index]
.name,
// model.searchList[index].name,
// model.searchList[index].name,
regular: true,
fontSize: 12,
fontWeight: FontWeight.w400,
@ -322,6 +344,10 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
);
}
bool isRTL(String text) {
return international.Bidi.detectRtlDirectionality(text);
}
searchMedicine(PharmacyCategoriseViewModel model, BuildContext context) {
Utils.hideKeyboard(context);
if (_formKey.currentState.validate())

@ -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);
}

@ -2809,6 +2809,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> {

@ -32,11 +32,16 @@ Widget getPaymentMethods() {
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset("assets/images/new/payment/Mada.png", width: 50, height: 50),
Image.asset("assets/images/new/payment/visa.png", width: 50, height: 50),
Image.asset("assets/images/new/payment/Mastercard.png", width: 50, height: 50),
Image.asset("assets/images/new/payment/Apple_Pay.png", width: 50, height: 50),
Image.asset("assets/images/new/payment/installments.png", width: 50, height: 50),
Image.asset("assets/images/new/payment/Mada.png",
width: 50, height: 50),
Image.asset("assets/images/new/payment/visa.png",
width: 50, height: 50),
Image.asset("assets/images/new/payment/Mastercard.png",
width: 50, height: 50),
Image.asset("assets/images/new/payment/Apple_Pay.png",
width: 50, height: 50),
Image.asset("assets/images/new/payment/installments.png",
width: 50, height: 50),
],
),
);
@ -48,10 +53,15 @@ Widget getNoDataWidget(BuildContext context) {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset('assets/images/new/not_found.svg', width: 110.0, height: 110.0),
SvgPicture.asset('assets/images/new/not_found.svg',
width: 110.0, height: 110.0),
Container(
margin: EdgeInsets.only(top: 15.0),
child: Text(TranslationBase.of(context).noResultFound, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xFFBABABA)))),
margin: EdgeInsets.only(top: 15.0),
child: Text(TranslationBase.of(context).noResultFound,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Color(0xFFBABABA)))),
],
),
),
@ -79,7 +89,8 @@ spacer() {
}
Future navigateTo(context, page) async {
return await Navigator.push(context, MaterialPageRoute(builder: (context) => page));
return await Navigator.push(
context, MaterialPageRoute(builder: (context) => page));
}
// Future navigateToReplace(context, page) async {
@ -137,7 +148,11 @@ Widget circularAviator(
child: Container(
width: s,
height: s,
decoration: containerColorRadiusBorderWidth(bcColor == null ? Colors.grey[200] : bcColor, 2000, brColor == null ? Colors.blueGrey[800] : brColor, borderWidth == null ? 2 : borderWidth),
decoration: containerColorRadiusBorderWidth(
bcColor == null ? Colors.grey[200] : bcColor,
2000,
brColor == null ? Colors.blueGrey[800] : brColor,
borderWidth == null ? 2 : borderWidth),
child: Icon(
icon == null ? Icons.person : icon,
size: s / 1.7,
@ -219,13 +234,14 @@ RoundedRectangleBorder buttonShape() {
);
}
Decoration containerRadiusWithGradient(double radius,{Color color1,Color color2}) {
Decoration containerRadiusWithGradient(double radius,
{Color color1, Color color2}) {
return BoxDecoration(
borderRadius: BorderRadius.circular(radius),
gradient: LinearGradient(
colors: [
color1?? Color(0xFFF71787E),
color2?? Color(0xFFF2B353E),
color1 ?? Color(0xFFF71787E),
color2 ?? Color(0xFFF2B353E),
],
begin: Alignment.centerLeft,
end: Alignment.centerRight,
@ -233,7 +249,8 @@ Decoration containerRadiusWithGradient(double radius,{Color color1,Color color2}
);
}
Decoration containerBottomRightRadiusWithGradient(double radius, {Color darkColor, Color lightColor}) {
Decoration containerBottomRightRadiusWithGradient(double radius,
{Color darkColor, Color lightColor}) {
return BoxDecoration(
borderRadius: BorderRadius.only(bottomRight: Radius.circular(radius)),
gradient: LinearGradient(
@ -247,7 +264,8 @@ Decoration containerBottomRightRadiusWithGradient(double radius, {Color darkColo
);
}
Decoration containerBottomRightRadiusWithGradientForAr(double radius, {Color darkColor, Color lightColor}) {
Decoration containerBottomRightRadiusWithGradientForAr(double radius,
{Color darkColor, Color lightColor}) {
return BoxDecoration(
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(radius)),
gradient: LinearGradient(
@ -261,9 +279,24 @@ Decoration containerBottomRightRadiusWithGradientForAr(double radius, {Color dar
);
}
Decoration containerRadiusWithGradientServices(double radius, {Color darkColor, Color lightColor}) {
Decoration containerRadiusWithGradientServices(
double radius, {
Color darkColor,
Color lightColor,
bool isProduct = false,
bool prescriptionRequired = false,
bool isEnglish = true,
}) {
return BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(radius)),
borderRadius: !isProduct || !prescriptionRequired
? BorderRadius.all(Radius.circular(radius))
: isEnglish
? BorderRadius.only(
topLeft: Radius.circular(26),
)
: BorderRadius.only(
topRight: Radius.circular(26),
),
gradient: LinearGradient(
colors: [
darkColor == null ? Color(0xFF2B353E) : darkColor,
@ -275,7 +308,11 @@ Decoration containerRadiusWithGradientServices(double radius, {Color darkColor,
);
}
Decoration containerBottomRightRadiusWithGradientBorder(double radius, {Color darkColor, Color lightColor, Color borderColor = Colors.transparent, double w = 0}) {
Decoration containerBottomRightRadiusWithGradientBorder(double radius,
{Color darkColor,
Color lightColor,
Color borderColor = Colors.transparent,
double w = 0}) {
return BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(radius)),
border: Border.all(
@ -304,7 +341,8 @@ Decoration containerRadius(Color background, double radius) {
);
}
Decoration containerColorRadiusBorder(Color background, double radius, Color color) {
Decoration containerColorRadiusBorder(
Color background, double radius, Color color) {
return BoxDecoration(
color: background,
border: Border.all(
@ -315,7 +353,8 @@ Decoration containerColorRadiusBorder(Color background, double radius, Color col
);
}
Decoration containerColorRadiusBorderWidth(Color background, double radius, Color color, double w) {
Decoration containerColorRadiusBorderWidth(
Color background, double radius, Color color, double w) {
return BoxDecoration(
color: background,
border: Border.all(
@ -326,13 +365,14 @@ Decoration containerColorRadiusBorderWidth(Color background, double radius, Colo
);
}
Decoration containerColorRadiusBorderWidthCircular(Color background, double radius, Color color, double w) {
Decoration containerColorRadiusBorderWidthCircular(
Color background, double radius, Color color, double w) {
return BoxDecoration(
color: background,
border: Border.all(
width: w, //
color: color // <--- border width here
),
),
// borderRadius: BorderRadius.circular(radius),
shape: BoxShape.circle,
);
@ -341,29 +381,36 @@ Decoration containerColorRadiusBorderWidthCircular(Color background, double radi
Decoration containerColorRadiusRight(Color background, double radius) {
return BoxDecoration(
color: background,
borderRadius: BorderRadius.only(topRight: Radius.circular(radius), bottomRight: Radius.circular(radius)),
borderRadius: BorderRadius.only(
topRight: Radius.circular(radius),
bottomRight: Radius.circular(radius)),
);
}
Decoration containerColorRadiusLeft(Color background, double radius) {
return BoxDecoration(
color: background,
borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)),
);
}
Decoration containerColorRadiusRightBorder(Color background, double radius, double w) {
Decoration containerColorRadiusRightBorder(
Color background, double radius, double w) {
return BoxDecoration(
color: background,
border: Border.all(
width: w, //
color: Colors.white // <--- border width here
),
borderRadius: BorderRadius.only(topRight: Radius.circular(radius), bottomRight: Radius.circular(radius)),
borderRadius: BorderRadius.only(
topRight: Radius.circular(radius),
bottomRight: Radius.circular(radius)),
);
}
Decoration containerColorRadiusRightBorderc(Color background, double radius, double w, Color borderColor) {
Decoration containerColorRadiusRightBorderc(
Color background, double radius, double w, Color borderColor) {
return BoxDecoration(
color: background,
border: Border.all(
@ -394,21 +441,23 @@ Decoration containerColorRadiusBottom(Color color, double radius) {
);
}
Decoration containerColorRadiusLeftBorder(Color background, double radius, double w) {
Decoration containerColorRadiusLeftBorder(
Color background, double radius, double w) {
return BoxDecoration(
color: background,
border: Border.all(
width: w, //
color: Colors.white // <--- border width here
),
borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radius), bottomLeft: Radius.circular(radius)),
);
}
BoxDecoration cardRadius(double radius,{Color color,double elevation}) {
return BoxDecoration(
BoxDecoration cardRadius(double radius, {Color color, double elevation}) {
return BoxDecoration(
shape: BoxShape.rectangle,
color: color??Colors.white,
color: color ?? Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(radius),
),
@ -416,7 +465,7 @@ BoxDecoration cardRadius(double radius,{Color color,double elevation}) {
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius:elevation?? 27,
blurRadius: elevation ?? 27,
offset: Offset(-2, 3),
),
],
@ -433,19 +482,23 @@ ShapeBorder cardRadiusNew(double radius) {
ShapeBorder cardRadiusTop(double radius) {
return RoundedRectangleBorder(
side: BorderSide(color: Colors.transparent, width: 0),
borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radius), topRight: Radius.circular(radius)),
);
}
ShapeBorder cardRadiusTop2(double radius) {
return RoundedRectangleBorder(
borderRadius: BorderRadius.only(topLeft: Radius.circular(radius), topRight: Radius.circular(radius)),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(radius), topRight: Radius.circular(radius)),
);
}
ShapeBorder cardRadiusBottom(double radius) {
return RoundedRectangleBorder(
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(radius), bottomRight: Radius.circular(radius)),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(radius),
bottomRight: Radius.circular(radius)),
);
}
@ -568,7 +621,8 @@ FontStyle getFontStyle(String fontStyle) {
bool timeCalculator(int startHour, int startMint, int endHour, int endMint) {
DateTime now = DateTime.now();
DateTime startDate = DateTime(now.year, now.month, now.day, startHour, startHour);
DateTime startDate =
DateTime(now.year, now.month, now.day, startHour, startHour);
DateTime endDate = DateTime(now.year, now.month, now.day, endHour, endMint);
if (startDate.isBefore(now) && endDate.isAfter(now))
return true;

@ -30,7 +30,7 @@ class SecondaryButton extends StatefulWidget {
this.noBorderRadius = false,
this.borderRadius,
this.disableColor,
this.fontWeight})
this.fontWeight, this.fontSize})
: super(key: key);
final String label;
@ -47,6 +47,7 @@ class SecondaryButton extends StatefulWidget {
final double borderRadius;
final Color disableColor;
final FontWeight fontWeight;
final double fontSize;
@override
@ -199,9 +200,9 @@ class _SecondaryButtonState extends State<SecondaryButton>
width: MediaQuery.of(context).size.width * 2.2,
height: MediaQuery.of(context).size.width * 2.2,
decoration: BoxDecoration(
shape: BoxShape.circle,
// shape: BoxShape.circle,
color: widget.disabled
? Colors.grey
? widget.disableColor ?? Colors.grey
: widget.color ?? Theme.of(context).buttonColor,
),
),
@ -211,8 +212,8 @@ class _SecondaryButtonState extends State<SecondaryButton>
padding: widget.iconOnly
? EdgeInsets.symmetric(vertical: 4.0, horizontal: 5.0)
: EdgeInsets.only(
top: widget.small ? 8.0 : 14.0,
bottom: widget.small ? 6.0 : 14.0,
top: widget.small ? 8.0 : 12.0,
bottom: widget.small ? 6.0 : 12.0,
left: 18.0,
right: 18.0),
child: Stack(
@ -245,9 +246,11 @@ class _SecondaryButtonState extends State<SecondaryButton>
bottom: widget.small ? 4.0 : 3.0),
child: Text(
widget.label,
textAlign: TextAlign.center,
style: TextStyle(
color: widget.textColor,
fontSize: widget.small ? 12.0 : 14.0,
fontSize: widget.small ? 12.0 : widget.fontSize??14.0,
fontWeight: FontWeight.w700,
fontFamily: projectViewModel.isArabic
? 'Cairo'

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

@ -93,24 +93,22 @@ class _ProcedureListWidgetState extends State<ProcedureListWidget> {
historyInfo),
activeColor: Colors.red[800],
onChanged: (bool newValue) {
setState(() {
if (widget.isEntityListSelected(
historyInfo)) {
widget
.removeHistory(historyInfo);
} else {
widget.addHistory(historyInfo);
}
});
selectOption(historyInfo);
}),
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 0),
child: Texts(historyInfo.name,
variant: "bodyText",
bold: true,
color: Colors.black),
child: InkWell(
onTap:(){
selectOption(historyInfo);
},
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 0),
child: Texts(historyInfo.name,
variant: "bodyText",
bold: true,
color: Colors.black),
),
),
),
],
@ -142,6 +140,19 @@ class _ProcedureListWidgetState extends State<ProcedureListWidget> {
);
}
selectOption(historyInfo){
setState(() {
if (widget.isEntityListSelected(
historyInfo)) {
widget
.removeHistory(historyInfo);
} else {
widget.addHistory(historyInfo);
}
});
}
void filterSearchResults(String query) {
List<CategoriseParentModel> dummySearchList = List();
dummySearchList.addAll(widget.masterList);

@ -34,25 +34,24 @@ class productTile extends StatelessWidget {
// final VoidCallback deleteWishlistItems;
productTile({
this.productName,
this.productPrice,
this.productRate,
this.productReviews,
this.qyt,
this.totalPrice,
this.isOrderDetails = false,
this.productImage,
this.showLine = true,
this.img,
this.imgs,
this.status,
this.product,
this.productID,
this.onDelete,
this.approvedTotalReviews,
this.isRx
});
productTile(
{this.productName,
this.productPrice,
this.productRate,
this.productReviews,
this.qyt,
this.totalPrice,
this.isOrderDetails = false,
this.productImage,
this.showLine = true,
this.img,
this.imgs,
this.status,
this.product,
this.productID,
this.onDelete,
this.approvedTotalReviews,
this.isRx});
@override
Widget build(BuildContext context) {
@ -93,46 +92,59 @@ class productTile extends StatelessWidget {
children: [
Container(
margin: EdgeInsets.all(5),
child: projectViewModel
.isArabic ? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: productName,
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
),
),
): Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: productName,
style: TextStyle(color: Colors.black54, fontSize: 15, fontWeight: FontWeight.bold),
),
),
),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: productName,
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
),
),
)
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: productName,
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
),
),
),
),
Container(
margin: EdgeInsets.all(5),
child: projectViewModel
.isArabic ? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: 'SAR $productPrice',
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
),
),
)
:Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: 'SAR $productPrice',
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 13),
),
),
),
child: projectViewModel.isArabic
? Align(
alignment: Alignment.topRight,
child: RichText(
text: TextSpan(
text: 'SAR $productPrice',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
),
),
)
: Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: 'SAR $productPrice',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
),
),
),
),
this.isOrderDetails == false
? Row(
@ -156,7 +168,10 @@ class productTile extends StatelessWidget {
),
Text(
'${approvedTotalReviews} ${TranslationBase.of(context).reviews}',
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.grey, fontSize: 13),
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.grey,
fontSize: 13),
),
],
)
@ -188,13 +203,15 @@ class productTile extends StatelessWidget {
color: Colors.green,
),
onPressed: () async {
if(isRx == false){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, productID, context);
GifLoaderDialogUtils.hideDialog(context);
Utils.navigateToCartPage();}
else {
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription);
if (isRx == false) {
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, productID, context);
GifLoaderDialogUtils.hideDialog(context);
Utils.navigateToCartPage();
} else {
AppToast.showErrorToast(
message: TranslationBase.of(context)
.needPrescription);
}
},
),
@ -213,8 +230,13 @@ class productTile extends StatelessWidget {
margin: EdgeInsets.only(bottom: 5.0),
child: RichText(
text: TextSpan(
text: TranslationBase.of(context).quantity + "" + '$qyt',
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.grey, fontSize: 13),
text: TranslationBase.of(context).quantity +
"" +
'$qyt',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.grey,
fontSize: 13),
),
),
),
@ -240,7 +262,10 @@ class productTile extends StatelessWidget {
RichText(
text: TextSpan(
text: ' $totalPrice SAR',
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.black, fontSize: 15),
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 15),
),
),
],
@ -253,7 +278,7 @@ class productTile extends StatelessWidget {
: Container(),
// this.isOrderDetails == true && model.order[0].orderStatusId == 30?
if (status == 30 || status == 997 ||status == 994 && this.isOrderDetails == true)
if (status == 30 || status == 997 && this.isOrderDetails == true)
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
@ -280,21 +305,33 @@ class productTile extends StatelessWidget {
// alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: '${productReviews} ${TranslationBase.of(context).reviews}',
text:
'${productReviews} ${TranslationBase.of(context).reviews}',
// text: '($productReviews reviews)',
style: TextStyle(fontWeight: FontWeight.bold, color: Colors.grey, fontSize: 13),
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.grey,
fontSize: 13),
),
),
),
),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: ProductReviewPage(product)));
Navigator.push(
context, FadePage(page: ProductReviewPage(product)));
},
child: Container(
padding: EdgeInsets.only(left: 13.0, right: 13.0, top: 5.0),
padding:
EdgeInsets.only(left: 13.0, right: 13.0, top: 5.0),
height: 30.0,
decoration: BoxDecoration(border: Border.all(color: Colors.orange, style: BorderStyle.solid, width: 1.0), color: Colors.transparent, borderRadius: BorderRadius.circular(5.0)),
decoration: BoxDecoration(
border: Border.all(
color: Colors.orange,
style: BorderStyle.solid,
width: 1.0),
color: Colors.transparent,
borderRadius: BorderRadius.circular(5.0)),
child: Text(
TranslationBase.of(context).writeReview,
style: TextStyle(

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

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