pharmacy fixes

merge-requests/483/head
haroon amjad 4 years ago
parent bebcd85557
commit be771917f0

@ -1625,4 +1625,5 @@ const Map localizedValues = {
"bodyFatTitle": {"en": "Body Fat", "ar": " الدهون في الجسم"},
"cholesTitle": {"en": "Blood Cholesterol", "ar": " الكولسترول في الدم"},
"laserClinic": {"en": "Laser Clinic", "ar": "عيادة الليزر"},
"noImage": {"en": "No Image", "ar": "لا توجد صورة"},
};

@ -1,157 +0,0 @@
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
class Prescriptions {
String setupID;
int projectID;
int patientID;
int appointmentNo;
String appointmentDate;
String doctorName;
String clinicDescription;
String name;
int episodeID;
int actualDoctorRate;
int admission;
int clinicID;
String companyName;
String despensedStatus;
DateTime dischargeDate;
int dischargeNo;
int doctorID;
String doctorImageURL;
int doctorRate;
String doctorTitle;
int gender;
String genderDescription;
bool isActiveDoctorProfile;
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
bool isInOutPatient;
String isInOutPatientDescription;
String isInOutPatientDescriptionN;
bool isInsurancePatient;
String nationalityFlagURL;
int noOfPatientsRate;
String qR;
List<String> speciality;
Prescriptions(
{this.setupID,
this.projectID,
this.patientID,
this.appointmentNo,
this.appointmentDate,
this.doctorName,
this.clinicDescription,
this.name,
this.episodeID,
this.actualDoctorRate,
this.admission,
this.clinicID,
this.companyName,
this.despensedStatus,
this.dischargeDate,
this.dischargeNo,
this.doctorID,
this.doctorImageURL,
this.doctorRate,
this.doctorTitle,
this.gender,
this.genderDescription,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isInOutPatient,
this.isInOutPatientDescription,
this.isInOutPatientDescriptionN,
this.isInsurancePatient,
this.nationalityFlagURL,
this.noOfPatientsRate,
this.qR,
this.speciality});
Prescriptions.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
patientID = json['PatientID'];
appointmentNo = json['AppointmentNo'];
appointmentDate = json['AppointmentDate'];
doctorName = json['DoctorName'];
clinicDescription = json['ClinicDescription'];
name = json['Name'];
episodeID = json['EpisodeID'];
actualDoctorRate = json['ActualDoctorRate'];
admission = json['Admission'];
clinicID = json['ClinicID'];
companyName = json['CompanyName'];
despensedStatus = json['Despensed_Status'];
dischargeDate = DateUtil.convertStringToDate(json['DischargeDate']);
dischargeNo = json['DischargeNo'];
doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL'];
doctorRate = json['DoctorRate'];
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
isActiveDoctorProfile = json['IsActiveDoctorProfile'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
isInOutPatient = json['IsInOutPatient'];
isInOutPatientDescription = json['IsInOutPatientDescription'];
isInOutPatientDescriptionN = json['IsInOutPatientDescriptionN'];
isInsurancePatient = json['IsInsurancePatient'];
nationalityFlagURL = json['NationalityFlagURL'];
noOfPatientsRate = json['NoOfPatientsRate'];
qR = json['QR'];
// speciality = json['Speciality'].cast<String>();
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['PatientID'] = this.patientID;
data['AppointmentNo'] = this.appointmentNo;
data['AppointmentDate'] = this.appointmentDate;
data['DoctorName'] = this.doctorName;
data['ClinicDescription'] = this.clinicDescription;
data['Name'] = this.name;
data['EpisodeID'] = this.episodeID;
data['ActualDoctorRate'] = this.actualDoctorRate;
data['Admission'] = this.admission;
data['ClinicID'] = this.clinicID;
data['CompanyName'] = this.companyName;
data['Despensed_Status'] = this.despensedStatus;
data['DischargeDate'] = this.dischargeDate;
data['DischargeNo'] = this.dischargeNo;
data['DoctorID'] = this.doctorID;
data['DoctorImageURL'] = this.doctorImageURL;
data['DoctorRate'] = this.doctorRate;
data['DoctorTitle'] = this.doctorTitle;
data['Gender'] = this.gender;
data['GenderDescription'] = this.genderDescription;
data['IsActiveDoctorProfile'] = this.isActiveDoctorProfile;
data['IsDoctorAllowVedioCall'] = this.isDoctorAllowVedioCall;
data['IsExecludeDoctor'] = this.isExecludeDoctor;
data['IsInOutPatient'] = this.isInOutPatient;
data['IsInOutPatientDescription'] = this.isInOutPatientDescription;
data['IsInOutPatientDescriptionN'] = this.isInOutPatientDescriptionN;
data['IsInsurancePatient'] = this.isInsurancePatient;
data['NationalityFlagURL'] = this.nationalityFlagURL;
data['NoOfPatientsRate'] = this.noOfPatientsRate;
data['QR'] = this.qR;
data['Speciality'] = this.speciality;
return data;
}
}
//class PrescriptionsList {
// String filterName = "";
// List<Prescriptions> prescriptionsList = List();
//
// PrescriptionsList({this.filterName, Prescriptions prescriptions}) {
// prescriptionsList.add(prescriptions);
// }
//}

@ -1,8 +1,7 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Prescriptions.dart';
class PrescriptionService extends BaseService {
final AppSharedPreferences sharedPref = AppSharedPreferences();
@ -11,14 +10,14 @@ class PrescriptionService extends BaseService {
String errorMsg = '';
List<Prescriptions> _prescriptionsList = List();
List<Prescriptions> get prescriptionsList => _prescriptionsList;
Future getPrescription() async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(PRESCRIPTION,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(PRESCRIPTION, onSuccess: (dynamic response, int statusCode) {
_prescriptionsList.clear();
response['PatientPrescriptionList'].forEach((prescriptions) {
_prescriptionsList.add(Prescriptions.fromJson(prescriptions));

@ -8,8 +8,6 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart';
import 'package:diplomaticquarterapp/core/service/parmacyModule/order-preview-service.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import '../../../locator.dart';
import '../base_view_model.dart';
@ -19,19 +17,17 @@ class OrderPreviewViewModel extends BaseViewModel {
List<Addresses> get addresses => _orderService.addresses;
LacumAccountInformation get lacumInformation =>
_orderService.lacumInformation;
LacumAccountInformation get lacumInformation => _orderService.lacumInformation;
List<OrderDetailModel> get orderListModel => _orderService.orderList;
PharmacyModuleViewModel pharmacyModuleViewModel =
locator<PharmacyModuleViewModel>();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
ShoppingCartResponse cartResponse = ShoppingCartResponse();
PaymentCheckoutData paymentCheckoutData = PaymentCheckoutData();
double totalAdditionalShippingCharge = 0;
setShoppingCartResponse(ShoppingCartResponse cart){
setShoppingCartResponse(ShoppingCartResponse cart) {
cartResponse = cart;
notifyListeners();
}
@ -71,8 +67,7 @@ class OrderPreviewViewModel extends BaseViewModel {
}
}
Future<ShoppingCartResponse> changeProductQuantity(
ShoppingCart product) async {
Future<ShoppingCartResponse> changeProductQuantity(ShoppingCart product) async {
setState(ViewState.Busy);
var resp = await _orderService.changeProductQuantity(product.id, product);
var object = _handleGetShoppingCartResponse(resp);
@ -125,11 +120,17 @@ class OrderPreviewViewModel extends BaseViewModel {
cartResponse.subtotalVatAmount = res["subtotal_vat_amount"];
cartResponse.subtotalVatRate = res["subtotal_vat_rate"];
cartResponse.shoppingCarts = List();
if (paymentCheckoutData.shippingOption != null) {
totalAdditionalShippingCharge = paymentCheckoutData.shippingOption.rate;
cartResponse.subtotalVatAmount += paymentCheckoutData.shippingOption.rateVat;
cartResponse.subtotal += paymentCheckoutData.shippingOption.rate + paymentCheckoutData.shippingOption.rateVat;
}
res["shopping_carts"].forEach((item) {
ShoppingCart shoppingCart = ShoppingCart.fromJson(item);
cartResponse.shoppingCarts.add(shoppingCart);
totalAdditionalShippingCharge +=
shoppingCart.product.additionalShippingCharge;
totalAdditionalShippingCharge += shoppingCart.product.additionalShippingCharge;
});
return cartResponse;
}
@ -173,7 +174,7 @@ class OrderPreviewViewModel extends BaseViewModel {
error = _orderService.error;
setState(ViewState.Error);
} else {
getLacumGroupData(identificationNo);
if (_orderService.lacumInformation.yahalaAccountNo != 0) getLacumGroupData(identificationNo);
}
}
@ -181,8 +182,7 @@ class OrderPreviewViewModel extends BaseViewModel {
setState(ViewState.Busy);
await _orderService.getLacumGroupInformation(identificationNo);
paymentCheckoutData.lacumInformation = _orderService.lacumGroupInformation;
paymentCheckoutData.usedLakumPoints = paymentCheckoutData
.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount;
paymentCheckoutData.usedLakumPoints = paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount;
if (_orderService.hasError) {
error = _orderService.error;
setState(ViewState.Error);
@ -193,9 +193,7 @@ class OrderPreviewViewModel extends BaseViewModel {
getShippingOption() async {
setState(ViewState.Busy);
await _orderService
.getShippingOption(paymentCheckoutData.address)
.then((res) {
await _orderService.getShippingOption(paymentCheckoutData.address).then((res) {
paymentCheckoutData.shippingOption = ShippingOption.fromJson(res);
setState(ViewState.Idle);
});
@ -211,8 +209,7 @@ class OrderPreviewViewModel extends BaseViewModel {
setState(ViewState.Busy);
await pharmacyModuleViewModel.generatePharmacyToken();
await _orderService.makeOrder(
paymentCheckoutData, cartResponse.shoppingCarts);
await _orderService.makeOrder(paymentCheckoutData, cartResponse.shoppingCarts);
if (_orderService.hasError) {
error = _orderService.error;
setState(ViewState.ErrorLocal);

@ -1,5 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/service/parmacyModule/prescription_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
@ -14,6 +14,7 @@ class PrescriptionViewModel extends BaseViewModel {
getPrescription() async {
await getSavedLanguage();
prescriptionsList.clear();
if(prescriptionsList.isEmpty){
setState(ViewState.Busy);
await _prescriptionService.getPrescription();

@ -52,7 +52,7 @@ class LocationModel {
int barcode;
dynamic companybarcode;
int cityId;
CityName cityName;
String cityName;
int distanceInKilometers;
String latitude;
int locationType;
@ -78,7 +78,7 @@ class LocationModel {
barcode: json["Barcode"],
companybarcode: json["Companybarcode"],
cityId: json["CityID"],
cityName: cityNameValues.map[json["CityName"]],
cityName: json["CityName"],
distanceInKilometers: json["DistanceInKilometers"],
latitude: json["Latitude"],
locationType: json["LocationType"],
@ -105,7 +105,7 @@ class LocationModel {
"Barcode": barcode,
"Companybarcode": companybarcode,
"CityID": cityId,
"CityName": cityNameValues.reverse[cityName],
"CityName": cityName,
"DistanceInKilometers": distanceInKilometers,
"Latitude": latitude,
"LocationType": locationType,

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_mo
import 'package:diplomaticquarterapp/locator.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/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -123,7 +124,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
styleTwo = true;
styleIcon = Icon(
Icons.auto_awesome_mosaic,
color: Colors.blue,
color: CustomColors.green,
size: 29.0,
);
} else {
@ -131,7 +132,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
styleTwo = false;
styleIcon = Icon(
Icons.widgets_sharp,
color: Colors.blue,
color: CustomColors.green,
size: 29.0,
);
}
@ -401,7 +402,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
height: 4.0,
),
Container(
width: MediaQuery.of(context).size.width * 0.65,
width: MediaQuery.of(context).size.width * 0.64,
child: Texts(
model.finalProducts[index].name,
regular: true,
@ -445,7 +446,7 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
icon: Icon(
Icons.shopping_cart,
size: 18,
color: Colors.blue,
color: CustomColors.green,
),
onPressed: () async {
if (model.finalProducts[index].rxMessage == null) {

File diff suppressed because it is too large Load Diff

@ -55,10 +55,10 @@ class _CartOrderPageState extends State<CartOrderPage> {
appBarTitle: TranslationBase.of(context).shoppingCart,
isShowAppBar: true,
isPharmacy: true,
//isBottomBar: true,
showHomeAppBarIcon: false,
isShowDecPage: false,
isMainPharmacyPages: true,
showPharmacyCart: false,
baseViewModel: model,
backgroundColor: Colors.white,
body: !(model.cartResponse.shoppingCarts == null ||

@ -33,9 +33,7 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
}
void getData() async {
if (isLoading)
await Provider.of<OrderPreviewViewModel>(context, listen: false)
.getShoppingCart();
if (isLoading) await Provider.of<OrderPreviewViewModel>(context, listen: false).getShoppingCart();
setState(() {
isLoading = false;
});
@ -63,7 +61,7 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
color: Color(0xFFF1F1F1),
child: Column(
children: [
SelectAddressWidget(model, widget.addresses,changeMainState),
SelectAddressWidget(model, widget.addresses, changeMainState),
SizedBox(
height: 10,
),
@ -97,11 +95,8 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
color: Colors.black,
),
...List.generate(
model.cartResponse.shoppingCarts != null
? model.cartResponse.shoppingCarts.length
: 0,
(index) => ProductOrderPreviewItem(
model.cartResponse.shoppingCarts[index]),
model.cartResponse.shoppingCarts != null ? model.cartResponse.shoppingCarts.length : 0,
(index) => ProductOrderPreviewItem(model.cartResponse.shoppingCarts[index]),
),
],
),
@ -219,9 +214,7 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
: Container(),
),
SizedBox(
height: model.cartResponse.shoppingCarts != null
? height * 0.10
: 0,
height: model.cartResponse.shoppingCarts != null ? height * 0.10 : 0,
)
],
),
@ -235,9 +228,8 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
),
);
}
changeMainState(){
setState(() {
});
changeMainState() {
setState(() {});
}
}

@ -1,24 +1,10 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/order_detail.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/payment-checkout-data.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/order_model_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/payment-method-select-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductOrderPreviewItem.dart';
import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -38,14 +24,15 @@ class _SelectAddressWidgetState extends State<SelectAddressWidget> {
AddressInfo address;
_navigateToAddressPage(String identificationNo) {
Navigator.push(context, FadePage(page: PharmacyAddressesPage()))
.then((result) {
Navigator.push(context, FadePage(page: PharmacyAddressesPage())).then((result) async {
if (result != null) {
GifLoaderDialogUtils.showMyDialog(context);
address = result;
widget.model.paymentCheckoutData.address =
Addresses.fromJson(address.toJson());
widget.model.getInformationsByAddress(identificationNo);
widget.changeMainState();
widget.model.paymentCheckoutData.address = Addresses.fromJson(address.toJson());
await widget.model.getInformationsByAddress(identificationNo);
await widget.model.getShoppingCart();
widget.changeMainState();
GifLoaderDialogUtils.hideDialog(context);
}
});
}
@ -53,8 +40,7 @@ class _SelectAddressWidgetState extends State<SelectAddressWidget> {
@override
void initState() {
if (widget.model.paymentCheckoutData.address != null) {
address = AddressInfo.fromJson(
widget.model.paymentCheckoutData.address.toJson());
address = AddressInfo.fromJson(widget.model.paymentCheckoutData.address.toJson());
}
super.initState();
}
@ -79,8 +65,7 @@ class _SelectAddressWidgetState extends State<SelectAddressWidget> {
),
Expanded(
child: Container(
padding:
EdgeInsets.symmetric(vertical: 0, horizontal: 6),
padding: EdgeInsets.symmetric(vertical: 0, horizontal: 6),
child: Texts(
TranslationBase.of(context).selectAddress,
fontSize: 14,
@ -114,8 +99,7 @@ class _SelectAddressWidgetState extends State<SelectAddressWidget> {
),
Expanded(
child: Container(
padding: EdgeInsets.symmetric(
vertical: 0, horizontal: 6),
padding: EdgeInsets.symmetric(vertical: 0, horizontal: 6),
child: Texts(
TranslationBase.of(context).shippingAddress,
fontSize: 14,
@ -190,8 +174,7 @@ class _SelectAddressWidgetState extends State<SelectAddressWidget> {
fit: BoxFit.scaleDown,
),
Container(
padding:
EdgeInsets.symmetric(vertical: 0, horizontal: 6),
padding: EdgeInsets.symmetric(vertical: 0, horizontal: 6),
child: Texts(
"${TranslationBase.of(context).shipBy}",
fontSize: 12,
@ -203,9 +186,7 @@ class _SelectAddressWidgetState extends State<SelectAddressWidget> {
child: Image.asset(
model.paymentCheckoutData.shippingOption == null
? ""
: model.paymentCheckoutData.shippingOption
.shippingRateComputationMethodSystemName ==
"Shipping.FixedOrByWeight"
: model.paymentCheckoutData.shippingOption.shippingRateComputationMethodSystemName == "Shipping.FixedOrByWeight"
? "assets/images/pharmacy_module/payment/hmg_shipping_logo.png"
: "assets/images/pharmacy_module/payment/aramex_shipping_logo.png",
fit: BoxFit.contain,

@ -39,10 +39,7 @@ class LakumMainPage extends StatelessWidget {
body: Container(
width: double.infinity,
child: SingleChildScrollView(
child: (model.lacumGroupInformation != null &&
model.lacumGroupInformation
.lakumInquiryInformationObjVersion !=
null)
child: (model.lacumGroupInformation != null && model.lacumGroupInformation.lakumInquiryInformationObjVersion != null)
? Column(
children: [
Stack(
@ -56,10 +53,7 @@ class LakumMainPage extends StatelessWidget {
SizedBox(
height: mediaQuery.size.height * 0.02,
),
Container(
width: mediaQuery.size.width * 1,
child: LakumBannerWidget(
model, mediaQuery, true)),
Container(width: mediaQuery.size.width * 1, child: LakumBannerWidget(model, mediaQuery, true)),
],
)
],
@ -67,20 +61,8 @@ class LakumMainPage extends StatelessWidget {
SizedBox(
width: 8,
),
LacumPointsWidget(
mediaQuery,
2,
TranslationBase.of(context).gained,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model.lacumGroupInformation
.lakumInquiryInformationObjVersion.gainedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPointsAmountPerYear),
LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPoints, model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPointsAmountPerYear),
SizedBox(
height: 20,
),
@ -90,38 +72,13 @@ class LakumMainPage extends StatelessWidget {
child: ListView(
scrollDirection: Axis.horizontal,
children: <Widget>[
LacumPointsWidget(
mediaQuery,
1,
TranslationBase.of(context).balance,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalance,
null),
LacumPointsWidget(mediaQuery, 1, TranslationBase.of(context).balance, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalance, null),
SizedBox(
width: 8,
),
LacumPointsWidget(
mediaQuery,
2,
TranslationBase.of(context).gained,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.pointsBalanceAmount,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.gainedPointsAmountPerYear),
LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPoints, model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPointsAmountPerYear),
SizedBox(
width: 8,
),
@ -129,40 +86,16 @@ class LakumMainPage extends StatelessWidget {
mediaQuery,
3,
TranslationBase.of(context).consumed,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount !=
null
? int.parse(model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount)
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount != null
? int.parse(model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount)
: 0,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmountPerYear),
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPoints,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmountPerYear),
SizedBox(
width: 8,
),
LacumPointsWidget(
mediaQuery,
4,
TranslationBase.of(context).transferred,
0,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.transferPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.transferPointsAmountPerYear),
LacumPointsWidget(mediaQuery, 4, TranslationBase.of(context).transferred, 0, model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPoints,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.transferPointsAmountPerYear),
],
),
),
@ -170,22 +103,11 @@ class LakumMainPage extends StatelessWidget {
mediaQuery,
3,
TranslationBase.of(context).consumed,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount !=
null
? int.parse(model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmount)
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount != null
? int.parse(model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmount)
: 0,
model.lacumGroupInformation
.lakumInquiryInformationObjVersion.consumedPoints,
model
.lacumGroupInformation
.lakumInquiryInformationObjVersion
.consumedPointsAmountPerYear),
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPoints,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.consumedPointsAmountPerYear),
SizedBox(
width: 8,
),
@ -197,8 +119,7 @@ class LakumMainPage extends StatelessWidget {
),
),
Container(
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -213,7 +134,7 @@ class LakumMainPage extends StatelessWidget {
Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Texts(
TranslationBase.of(context).Expired,
TranslationBase.of(context).expiryDate,
// "Expired",
fontSize: 14,
),
@ -234,45 +155,39 @@ class LakumMainPage extends StatelessWidget {
// fontSize: 14,
// ),
Container(
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Row(
children: [
Row(
children: [
Image.asset(
"assets/images/pharmacy_module/lakum/waiting_gained_icon.png",
fit: BoxFit.fill,
width: 20,
height: 25,
),
Padding(
padding:
EdgeInsets.symmetric(horizontal: 8),
child: Texts(
TranslationBase.of(context)
.Waitinggained,
// "Waiting gained",
fontSize: 14,
),
)
],
),
Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} ${TranslationBase.of(context).lakumPoint}",
fontWeight: FontWeight.bold,
fontSize: 14,
Image.asset(
"assets/images/pharmacy_module/lakum/waiting_gained_icon.png",
fit: BoxFit.fill,
width: 20,
height: 25,
),
])),
Padding(
padding: EdgeInsets.symmetric(horizontal: 8),
child: Texts(
TranslationBase.of(context).Waitinggained,
// "Waiting gained",
fontSize: 14,
),
)
],
),
Texts(
"${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} ${TranslationBase.of(context).lakumPoint}",
fontWeight: FontWeight.bold,
fontSize: 14,
),
])),
// Texts(
// "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.waitingPoints} Points",
// fontWeight: FontWeight.bold,
// fontSize: 14,
// ),
Container(
margin:
EdgeInsets.symmetric(vertical: 16, horizontal: 8),
margin: EdgeInsets.symmetric(vertical: 16, horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -325,11 +240,7 @@ class LakumMainPage extends StatelessWidget {
}
navigateToLakumRegister(BuildContext context) {
Navigator.pushReplacement(
context,
FadePage(
page: LakumRegistrationPage(
projectViewModel.user.patientIdentificationNo)));
Navigator.pushReplacement(context, FadePage(page: LakumRegistrationPage(projectViewModel.user.patientIdentificationNo)));
}
}
@ -339,12 +250,7 @@ List<Widget> _buildAppBarICons(BuildContext context, LacumViewModel model) {
icon: Icon(Icons.settings),
color: Colors.white,
onPressed: () {
Navigator.push(
context,
FadePage(
page: LakumSettingPage(
model.lacumInformation, model.lacumGroupInformation)))
.then((result) => {model.getLacumGroupData()});
Navigator.push(context, FadePage(page: LakumSettingPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()});
},
),
];
@ -366,9 +272,7 @@ class LakumHomeButtons extends StatelessWidget {
child: InkWell(
onTap: () {
print("Account activate click");
Navigator.push(
context, FadePage(page: LakumActivationVidaPage()))
.then((result) => {model.getLacumGroupData()});
Navigator.push(context, FadePage(page: LakumActivationVidaPage())).then((result) => {model.getLacumGroupData()});
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 8),
@ -411,12 +315,7 @@ class LakumHomeButtons extends StatelessWidget {
child: InkWell(
onTap: () {
print("Lacum transfer click");
Navigator.push(
context,
FadePage(
page: LacumTransferPage(model.lacumInformation,
model.lacumGroupInformation)))
.then((result) => {model.getLacumGroupData()});
Navigator.push(context, FadePage(page: LacumTransferPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()});
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 8),
@ -467,8 +366,7 @@ class LacumPointsWidget extends StatelessWidget {
Color titleColor;
final List<PointsAmountPerYear> pointsAmountPerYear;
LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal,
this.point, this.pointsAmountPerYear) {
LacumPointsWidget(this.mediaQuery, this.pointType, this.title, this.riyal, this.point, this.pointsAmountPerYear) {
if (pointType == 1) {
titleColor = Color(0xffefefef);
} else if (pointType == 2) {
@ -486,11 +384,9 @@ class LacumPointsWidget extends StatelessWidget {
onTap: () {
if (pointType != 1) {
if (pointsAmountPerYear != null && pointsAmountPerYear.length > 0) {
Navigator.push(context,
FadePage(page: LakumPointsYearPage(pointsAmountPerYear)));
Navigator.push(context, FadePage(page: LakumPointsYearPage(pointsAmountPerYear)));
} else {
AppToast.showErrorToast(
message: TranslationBase.of(context).lakumMsg);
AppToast.showErrorToast(message: TranslationBase.of(context).lakumMsg);
// show snackBar No Details Points are there
}
}

@ -173,7 +173,7 @@ class LacumPointsYearWidget extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Texts(TranslationBase.of(context).RIYAL,
Texts(TranslationBase.of(context).sar,
// "RIYAL",
fontSize: 13,
fontWeight: FontWeight.bold,

@ -55,11 +55,11 @@ class _PharmacyPageState extends State<PharmacyPage> {
//crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
BannerPager(model),
// GridViewButtons(model),
PrescriptionsWidget(),
ShopByBrandWidget(),
// ShopByBrandWidget(),
RecentlyViewedWidget(),
BestSellerWidget(),
ShopByBrandWidget(),
],
),
),

@ -1,82 +1,73 @@
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:flutter/material.dart';
class AvailabilityInfo extends StatelessWidget {
final ProductDetailViewModel previousModel;
const AvailabilityInfo({Key key, this.previousModel}) : super(key: key);
@override
Widget build(BuildContext context) {
return previousModel.productLocationService.length == 0
? Container(
padding: EdgeInsets.all(15),
alignment: Alignment.center,
child: Text(
TranslationBase.of(context).noLocationAvailable,
),
)
padding: EdgeInsets.all(15),
alignment: Alignment.center,
child: Text(
TranslationBase.of(context).noLocationAvailable,
),
)
: ListView.builder(
physics: ScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: previousModel.productLocationService.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Image.network(previousModel
.productLocationService[index].projectImageUrl),
),
SizedBox(
width: 10,
),
Expanded(
flex: 4,
child: Text(
previousModel.productLocationService[index]
.locationDescription +
"\n" +
convertCityName(
previousModel.productLocationService[0].cityName
.toString(),
physics: ScrollPhysics(),
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemCount: previousModel.productLocationService.length,
itemBuilder: (BuildContext context, int index) {
return Padding(
padding: EdgeInsets.all(8.0),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
flex: 1,
child: Image.network(previousModel.productLocationService[index].projectImageUrl),
),
SizedBox(
width: 10,
),
Expanded(
flex: 4,
child: Text(
previousModel.productLocationService[index].locationDescription + "\n" + previousModel.productLocationService[index].cityName.toString(),
style: TextStyle(fontSize: 12),
),
style: TextStyle(fontSize: 12),
),
),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons.location_on),
color: Colors.red,
onPressed: () {},
),
),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons.phone),
color: Colors.red,
onPressed: () {},
),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons.location_on),
color: Colors.red,
onPressed: () {},
),
),
Expanded(
flex: 1,
child: IconButton(
icon: Icon(Icons.phone),
color: Colors.red,
onPressed: () {},
),
),
],
),
),
],
),
Divider(height: 1.2, color: Colors.grey)
],
),
);
},
);
Divider(height: 1.2, color: Colors.grey)
],
),
);
},
);
}
convertCityName(txt) {

@ -206,11 +206,15 @@ class _FooterWidgetState extends State<FooterWidget> {
WELCOME_LOGIN,
);
} else {
await widget.addToShoppingCartFunction(quantity: widget.quantity, itemID: widget.item.id, model: widget.model);
Navigator.push(
context,
FadePage(page: CartOrderPage()),
);}
await widget.addToShoppingCartFunction(quantity: widget.quantity, itemID: widget.item.id, model: widget.model);
Navigator.of(context).pushNamed(
CART_ORDER_PAGE,
);
// Navigator.push(
// context,
// FadePage(page: CartOrderPage()),
// );
}
},
fontWeight: FontWeight.w600,
borderColor: Colors.grey[800],
@ -224,7 +228,6 @@ class _FooterWidgetState extends State<FooterWidget> {
),
],
),
);
}

@ -317,7 +317,9 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
}
addToShoppingCartFunction({quantity, itemID, ProductDetailViewModel model}) async {
GifLoaderDialogUtils.showMyDialog(context);
await model.addToCartData(quantity, itemID);
GifLoaderDialogUtils.hideDialog(context);
}
addToWishlistFunction({itemID, ProductDetailViewModel model}) async {

@ -3,11 +3,13 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/Prescription
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_items_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/home/ViewAllHomeWidget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
@ -34,138 +36,150 @@ class PrescriptionsWidget extends StatelessWidget {
ViewAllHomeWidget(TranslationBase.of(context).myPrescription, HomePrescriptionsPage()),
Container(
margin: EdgeInsets.only(right: 10.0, left: 10.0),
height: MediaQuery.of(context).size.height * 0.2,
height: MediaQuery.of(context).size.height * 0.19,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
physics: ScrollPhysics(),
itemCount: model.prescriptionsList.length,
itemBuilder: (context, index) {
return Container(
padding: EdgeInsets.only(left: 8.0, right: 8.0),
margin: EdgeInsets.only(right: 5.0, left: 5.0),
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey,
style: BorderStyle.solid,
width: 1.0,
return InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: PrescriptionItemsPage(
prescriptions: model.prescriptionsList[index],
),
),
color: Colors.white,
borderRadius: BorderRadius.circular(10.0)),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(
top: 10.0,
left: 10.0,
right: 10.0,
bottom: 10.0,
),
child: CircleAvatar(
radius: 30,
backgroundColor: Colors.transparent,
child: Image.network(
model.prescriptionsList[index].doctorImageURL,
width: 50,
height: 50,
);
},
child: Container(
padding: EdgeInsets.only(left: 8.0, right: 8.0),
margin: EdgeInsets.only(right: 5.0, left: 5.0),
decoration: BoxDecoration(
border: Border.all(
color: Colors.grey,
style: BorderStyle.solid,
width: 1.0,
),
color: Colors.white,
borderRadius: BorderRadius.circular(10.0)),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: <Widget>[
Row(
children: <Widget>[
Container(
padding: EdgeInsets.only(
top: 10.0,
left: 10.0,
right: 10.0,
bottom: 10.0,
),
child: CircleAvatar(
radius: 30,
backgroundColor: Colors.transparent,
child: Image.network(
model.prescriptionsList[index].doctorImageURL,
width: 50,
height: 50,
),
),
),
),
Column(
children: [
Container(
padding: EdgeInsets.only(left: 15.0, right: 15.0),
decoration: BoxDecoration(
border: Border.all(
Column(
children: [
Container(
padding: EdgeInsets.only(left: 15.0, right: 15.0),
decoration: BoxDecoration(
border: Border.all(
color: Colors.green,
style: BorderStyle.solid,
width: 3.0,
),
color: Colors.green,
style: BorderStyle.solid,
width: 3.0,
borderRadius: BorderRadius.circular(30.0)),
child: Text(
model.languageID == "ar"
? model.prescriptionsList[index].isInOutPatientDescriptionN.toString()
: model.prescriptionsList[index].isInOutPatientDescription.toString(),
style: TextStyle(
color: Colors.white,
fontSize: 15.0,
),
color: Colors.green,
borderRadius: BorderRadius.circular(30.0)),
child: Text(
model.languageID == "ar"
? model.prescriptionsList[index].isInOutPatientDescriptionN.toString()
: model.prescriptionsList[index].isInOutPatientDescription.toString(),
)),
Row(children: <Widget>[
Image.asset(
'assets/images/Icon-awesome-calendar.png',
width: 30,
height: 30,
),
Text(
DateUtil.convertStringToDate(model.prescriptionsList[index].appointmentDate.toString()).toString().substring(0, 10),
style: TextStyle(
color: Colors.white,
color: Colors.black,
fontSize: 15.0,
),
)),
Row(children: <Widget>[
Image.asset(
'assets/images/Icon-awesome-calendar.png',
width: 30,
height: 30,
),
Text(
DateUtil.convertStringToDate(model.prescriptionsList[index].appointmentDate.toString()).toString().substring(0, 10),
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
),
)
]),
],
),
],
),
Container(
margin: EdgeInsets.only(left: 5),
child: Row(children: <Widget>[
Text(
model.prescriptionsList[index].doctorTitle.toString(),
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold,
)
]),
],
),
),
Text(
model.prescriptionsList[index].doctorName.toString(),
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold,
],
),
Container(
margin: EdgeInsets.only(left: 5),
child: Row(children: <Widget>[
Text(
model.prescriptionsList[index].doctorTitle.toString(),
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold,
),
),
),
]),
),
Container(
margin: EdgeInsets.only(left: 5),
child: Text(
model.prescriptionsList[index].clinicDescription.toString(),
style: TextStyle(
color: Colors.green,
fontSize: 15.0,
),
Text(
model.prescriptionsList[index].doctorName.toString(),
style: TextStyle(
color: Colors.black,
fontSize: 15.0,
fontWeight: FontWeight.bold,
),
),
]),
),
),
Row(children: <Widget>[
Container(
margin: EdgeInsets.only(left: 5),
child: RatingBar.readOnly(
initialRating: model.prescriptionsList[index].actualDoctorRate.toDouble(),
size: 15.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
child: Text(
model.prescriptionsList[index].clinicDescription.toString(),
style: TextStyle(
color: Colors.green,
fontSize: 15.0,
),
),
),
SizedBox(
width: 100.0,
),
Container(
child: Icon(
Icons.arrow_forward,
color: Theme.of(context).primaryColor,
)),
Row(children: <Widget>[
Container(
margin: EdgeInsets.only(left: 5),
child: RatingBar.readOnly(
initialRating: model.prescriptionsList[index].actualDoctorRate.toDouble(),
size: 15.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
SizedBox(
width: 130.0,
),
Container(
child: Icon(
Icons.arrow_forward,
color: Theme.of(context).primaryColor,
)),
]),
]),
]),
),
);
},
),

@ -125,7 +125,7 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(TranslationBase.of(context).IDENTIFICATION,
Texts(TranslationBase.of(context).identificationNumber,
// "IDENTIFICATION #",
fontSize: 14,
fontWeight: FontWeight.bold,

File diff suppressed because it is too large Load Diff

@ -14,8 +14,8 @@ import 'package:diplomaticquarterapp/pages/login/register-info.dart';
import 'package:diplomaticquarterapp/pages/login/register.dart';
import 'package:diplomaticquarterapp/pages/login/welcome.dart';
import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesCartPage.dart';
import 'package:diplomaticquarterapp/pages/packages_offers/OfferAndPackagesPage.dart';
import 'package:diplomaticquarterapp/pages/packages_offers/PackageOrderCompletedPage.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/cart-order-page.dart';
import 'package:diplomaticquarterapp/pages/settings/settings.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/select-gender.dart';
@ -47,6 +47,7 @@ const String PACKAGES_OFFERS_CART = 'packages-offers-cart';
const String PACKAGES_ORDER_COMPLETED = 'packages-offers-cart';
const String TEST_PAGE = 'test-page';
const String OPENTOK_CALL_PAGE = 'OPENTOK_CALL_PAGE';
const String CART_ORDER_PAGE = 'cart-order-page';
const String HEALTH_WEATHER = 'health-weather';
const APP_UPDATE = 'app-update';
@ -74,9 +75,10 @@ var routes = {
HEALTH_WEATHER: (_) => HealthWeatherIndicator(),
APP_UPDATE: (_) => AppUpdatePage(),
SETTINGS: (_) => Settings(),
CART_ORDER_PAGE: (_) => CartOrderPage(),
OPENTOK_CALL_PAGE: (_) => OpenTokConnectCallPage(
apiKey: '46209962',
sessionId: '1_MX40NjIwOTk2Mn5-MTYzNDY0ODM3NDY2Nn5PcnpnNGM0R1Q3ODZ6UXlFQ01lMDF5YWJ-fg',
token: 'T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9Y2ZhZjMzZjA3MWFkMjkxN2JmYjEwZDkxYTRkOTdhN2NmNWE4YjMyYTpzZXNzaW9uX2lkPTFfTVg0ME5qSXdPVGsyTW41LU1UWXpORFkwT0RNM05EWTJObjVQY25wbk5HTTBSMVEzT0RaNlVYbEZRMDFsTURGNVlXSi1mZyZjcmVhdGVfdGltZT0xNjM0NjQ4Mzc1Jm5vbmNlPTAuNzczMzcxNDUxMDgzMjQyMyZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNjM0NzM0Nzc1JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9'
),
token:
'T1==cGFydG5lcl9pZD00NjIwOTk2MiZzaWc9Y2ZhZjMzZjA3MWFkMjkxN2JmYjEwZDkxYTRkOTdhN2NmNWE4YjMyYTpzZXNzaW9uX2lkPTFfTVg0ME5qSXdPVGsyTW41LU1UWXpORFkwT0RNM05EWTJObjVQY25wbk5HTTBSMVEzT0RaNlVYbEZRMDFsTURGNVlXSi1mZyZjcmVhdGVfdGltZT0xNjM0NjQ4Mzc1Jm5vbmNlPTAuNzczMzcxNDUxMDgzMjQyMyZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNjM0NzM0Nzc1JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9'),
};

@ -1421,6 +1421,7 @@ class TranslationBase {
String get enablingWifi => localizedValues['enablingWifi'][locale.languageCode];
String get offerAndPackages => localizedValues['offerAndPackages'][locale.languageCode];
String get offerAndPackagesDetails => localizedValues['offerAndPackagesDetails'][locale.languageCode];
String get invoiceNo => localizedValues['InvoiceNo'][locale.languageCode];
@ -2608,6 +2609,7 @@ class TranslationBase {
String get laserClinic => localizedValues["laserClinic"][locale.languageCode];
String get noImage => localizedValues["noImage"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -14,6 +14,7 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/pages/search_products_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -493,7 +494,8 @@ class AppBarWidgetState extends State<AppBarWidget> {
icon: Badge(badgeContent: Text(orderPreviewViewModel.cartResponse.quantityCount.toString()), child: Icon(Icons.shopping_cart)),
color: Colors.white,
onPressed: () {
Navigator.of(context).popUntil(ModalRoute.withName('/'));
// Navigator.of(context).popUntil(ModalRoute.withName('/'));
Navigator.of(context).popAndPushNamed(CART_ORDER_PAGE);
})
: Container(),
(widget.isOfferPackages && widget.showOfferPackagesCart)

Loading…
Cancel
Save