Merge branch 'development_new_design_2.0' into zik_new_design_2.0

* development_new_design_2.0:
  Layout files
  pharmacy updates
  fixed issues
  Updates
  UI fixes
  Updates
  Smartwatch updates
  Smartwatch updates
  fixed issues
  fixed loader issue
merge-requests/458/head
Zohaib Iqbal Kambrani 3 years ago
commit ebfa9cd630

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@ -21,7 +21,7 @@ const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// Pharmacy Production URLs
// // Pharmacy Production URLs
const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
@ -102,18 +102,6 @@ const GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID = 'Services/Patients.svc/REST/Patient
const UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
// HHC RC SERVICES
const HHC_GET_ALL_SERVICES_RC = "rc/api/HHC/getallhhc";
const ADD_HHC_ORDER_RC = "rc/api/HHC/add";
const GET_ALL_HHC_ORDERS_RC = 'rc/api/hhc/list';
const UPDATE_HHC_ORDER_RC = 'rc/api/hhc/update';
// RRT RC SERVICES
const ADD_RRT_ORDER_RC = 'rc/api/rrt/add';
const GET_ALL_RRT_ORDERS_RC = 'rc/api/rrt/list';
const UPDATE_RRT_ORDER_RC = 'rc/api/rrt/update';
/// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const GET_ALL_TRANSPORTATIONS_RC = 'rc/api/Transportation/getalltransportation';
@ -452,12 +440,24 @@ const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews';
const BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
// HHC RC SERVICES
const HHC_GET_ALL_SERVICES_RC = "rc/api/HHC/getallhhc";
const ADD_HHC_ORDER_RC = "rc/api/HHC/add";
const GET_ALL_HHC_ORDERS_RC = 'rc/api/hhc/list';
const UPDATE_HHC_ORDER_RC = 'rc/api/hhc/update';
// CMC RC SERVICES
const GET_ALL_CMC_SERVICES_RC = 'rc/api/cmc/getallcmc';
const ADD_CMC_ORDER_RC = 'rc/api/cmc/add';
const GET_ALL_CMC_ORDERS_RC = 'rc/api/cmc/list';
const UPDATE_CMC_ORDER_RC = 'rc/api/cmc/update';
// RRT RC SERVICES
const ADD_RRT_ORDER_RC = "rc/api/rrt/add";
const GET_ALL_RRT_ORDERS_RC = "rc/api/rrt/list";
const UPDATE_RRT_ORDER_RC = 'rc/api/rrt/update';
//Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/";
const DELETE_WISHLIST = "delete_shopping_cart_item_by_product?customer_id=";

@ -620,7 +620,7 @@ const Map localizedValues = {
"reset": {"en": "Reset", "ar": "اعادة تعيين"},
"apply": {"en": "Apply", "ar": "تطبيق"},
"viewCategorise": {"en": "View All Categories", "ar": "عرض جميع الفئات"},
"categorise": {"en": "Categories", "ar": "التطبيقات"},
"categorise": {"en": "Categories", "ar": "الفئات"},
"wishList": {"en": "WishList", "ar": "المفضلة"},
"myAccount": {"en": "My Account", "ar": "حسابي"},
"cart": {"en": "Cart", "ar": "التسوق"},
@ -1588,4 +1588,19 @@ const Map localizedValues = {
"avgDistance": { "en": "Average Distance", "ar": "متوسط المسافة" },
"enterDetails": {"en": "Enter Details", "ar": "أدخل التفاصيل"},
"avgHeartRate": { "en": "Average Heart Rate", "ar": "متوسط معدل ضربات القلب" },
"alreadySynced": { "en": "Already Synced", "ar": "متزامنة" },
"sync-instructions-intro1": { "en": "It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App", "ar": "يبدو أنك لم تقم بمزامنة بياناتك الصحية مع تطبيق Dr. Alhabib App من قبل. للمتابعة ، تحتاج إلى مزامنة بياناتك الصحية مع تطبيق Dr. Alhabib" },
"sync-instructions-intro2": { "en": "Before syncing data, please make sure that you have followed the instructions properly", "ar": "قبل مزامنة البيانات ، يرجى التأكد من اتباع التعليمات بشكل صحيح." },
"sync-instructions-intro3": { "en": "Before syncing data, please make sure that following instructions are met:", "ar": "قبل مزامنة البيانات ، يرجى التأكد من تلبية الإرشادات التالية:" },
"ios-instructions-1": { "en": "Make sure that you have installed 'Health' App & 'Watch' App from Apple Store.", "ar": "تأكد من أنك قمت بتثبيت تطبيق 'Health' App & 'Watch' من متجر Apple." },
"ios-instructions-2": { "en": "Make sure that your Apple Watch is connected with the Watch & Health Apps.", "ar": "تأكد من اتصال Apple Watch بتطبيقات Watch & Health." },
"ios-instructions-3": { "en": "Make sure that data like heart rate, steps, distance etc. are being shown on your health app.", "ar": "تأكد من عرض بيانات مثل معدل ضربات القلب والخطوات والمسافة وما إلى ذلك على تطبيق صحتك." },
"supportedWatches": { "en": "Supported SmartWatches", "ar": "الساعات الذكية المدعومة" },
"watchInstructions": { "en": "Watch Instructions:", "ar": "تعليمات الساعة:" },
"monthlyTab": {"en": "Monthly", "ar": "شهري"},
"moreSupportedWatches": {"en": "More Supported Smartwatches...", "ar": "المزيد من الساعات الذكية المدعومة..."},
"android-instructions-1": { "en": "Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore.", "ar": "تأكد من تثبيت تطبيقات 'WearOS' و 'Google Fit' من متجر Google PlayStore." },
"android-instructions-2": { "en": "Make sure that you have installed your watch related apps from Google PlayStore.", "ar": "تأكد من أنك قمت بتثبيت التطبيقات المتعلقة بالساعات من Google PlayStore." },
"android-instructions-3": { "en": "Make sure that your Smart Watch is connected with the WearOS app & your watch apps.", "ar": "تأكد من أن ساعتك الذكية متصلة بتطبيق WearOS وتطبيقات ساعتك." },
"android-instructions-4": { "en": "Make sure that your smart watch apps are linked/associated with Google Fit App.", "ar": "تأكد من أن تطبيقات ساعتك الذكية مرتبطة / مرتبطة بتطبيق Google Fit." }, "android-instructions-5": { "en": "Make sure that data like heart rate, steps, distance etc. are being shown on your watch app & on Google Fit app & both are in sync.", "ar": "تأكد من عرض بيانات مثل معدل ضربات القلب والخطوات والمسافة وما إلى ذلك على تطبيق الساعة وعلى تطبيق Google Fit وكلاهما في حالة مزامنة." },
};

@ -20,7 +20,7 @@ class PharmacyProduct {
bool allowCustomerReviews;
int approvedRatingSum;
int notApprovedRatingSum;
int approvedTotalReviews;
dynamic approvedTotalReviews;
int notApprovedTotalReviews;
dynamic sku;
bool isRx;

@ -24,7 +24,7 @@ class OrdersModel {
class Orders {
String id;
int productCount;
double orderTotal;
dynamic orderTotal;
String createdOnUtc;
int orderStatusId;
String orderStatus;
@ -32,9 +32,9 @@ class Orders {
bool canCancel;
bool canRefund;
dynamic customerId;
double orderSubtotalExclTax;
dynamic orderSubtotalExclTax;
dynamic orderShippingExclTax;
double orderTax;
dynamic orderTax;
Orders(
@ -64,9 +64,9 @@ class Orders {
canCancel = json['can_cancel'];
canRefund = json['can_refund'];
customerId = json['customer_id'];
orderSubtotalExclTax= json["order_subtotal_excl_tax"].toDouble();
orderSubtotalExclTax= json["order_subtotal_excl_tax"];
orderShippingExclTax= json["order_shipping_excl_tax"];
orderTax= json["order_tax"].toDouble();
orderTax= json["order_tax"];
}catch(e){
print(e);
}

@ -116,6 +116,8 @@ class BaseAppClient {
}
}
// body['IdentificationNo'] = 1009199553;
// body['MobileNo'] = "966545156035";
// body['PatientID'] = 1018977;
// body['TokenID'] = "@dm!n";

@ -3,6 +3,7 @@ import 'dart:async';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
@ -17,8 +18,8 @@ import '../base_view_model.dart';
class RRTService extends BaseService {}
class _RRTServiceData {
List<PrescriptionsOrder> pendingOrders = [];
List<PrescriptionsOrder> completedOrders = [];
List<GetCMCAllOrdersResponseModel> pendingOrders = [];
List<GetCMCAllOrdersResponseModel> completedOrders = [];
ServicePrice servicePrice;
}
@ -34,7 +35,8 @@ class RRTViewModel extends BaseViewModel {
Future<_RRTServiceData> loadRequiredData() async {
await getServicePrice();
await getAllOrders();
// await getAllOrders();
await getAllOrdersRC();
return rrtServiceData;
}
@ -79,9 +81,9 @@ class RRTViewModel extends BaseViewModel {
if (json["ServiceID"] == 5) {
if (json["Status"] == 1 || json["Status"] == 2) {
// Pending
rrtServiceData.pendingOrders.add(PrescriptionsOrder.fromJson(json));
rrtServiceData.pendingOrders.add(GetCMCAllOrdersResponseModel.fromJson(json));
}
rrtServiceData.completedOrders.add(PrescriptionsOrder.fromJson(json));
rrtServiceData.completedOrders.add(GetCMCAllOrdersResponseModel.fromJson(json));
}
});
}
@ -91,6 +93,26 @@ class RRTViewModel extends BaseViewModel {
return rrtServiceData;
}
Future<_RRTServiceData> getAllOrdersRC() async {
await _service.baseAppClient.post(GET_ALL_RRT_ORDERS_RC, body: {}, onSuccess: (response, statusCode) {
var data = response["response"];
rrtServiceData.completedOrders.clear();
rrtServiceData.pendingOrders.clear();
if (data != null && data is List) {
data.forEach((json) {
if (json["StatusId"] == 1 || json["StatusId"] == 2) {
// Pending
rrtServiceData.pendingOrders.add(GetCMCAllOrdersResponseModel.fromJson(json));
}
rrtServiceData.completedOrders.add(GetCMCAllOrdersResponseModel.fromJson(json));
});
}
}, onFailure: (error, statusCode) {
AppToast.showErrorToast(message: error);
});
return rrtServiceData;
}
Future getOrderDetails() async {
return null;
}
@ -136,6 +158,19 @@ class RRTViewModel extends BaseViewModel {
return Future.value(success);
}
Future<bool> cancelOrderRC(GetCMCAllOrdersResponseModel order, {String reason = ""}) async {
Map<String, dynamic> body = {"Id": order.iD, "ClickButton": 16};
var success = false;
await _service.baseAppClient.post(UPDATE_RRT_ORDER_RC, body: body, onSuccess: (response, statusCode) {
success = true;
rrtServiceData.pendingOrders.remove(order);
}, onFailure: (error, statusCode) {
AppToast.showErrorToast(message: error);
success = false;
});
return Future.value(success);
}
Future<List<AddressInfo>> getAddresses() async {
Object error;
try {
@ -175,7 +210,6 @@ class RRTViewModel extends BaseViewModel {
await getCustomerAddresses();
}
// setState(ViewState.Busy);
// await _pharmacy_service.generatePharmacyToken();
// if (_customerAddressesService.hasError) {

@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart';
@ -89,28 +90,25 @@ class _AllHabibMedicalSevicePage2State extends State<AllHabibMedicalSevicePage2>
child: SingleChildScrollView(
child: Column(
children: [
AspectRatio(
aspectRatio: 1.9,
child: Container(
width: double.infinity,
height: double.infinity,
decoration: containerRadiusWithGradient(0,
color1: timeCalculator(6, 0, 10, 59)
? Color(0xFFB3E3FE)
: timeCalculator(11, 0, 15, 59)
? Color(0xFFFF9E7E)
: Color(0xFF2E6686),
color2: timeCalculator(6, 0, 10, 59)
? Color(0xFF9AC7FF)
: timeCalculator(11, 0, 15, 59)
? Color(0xFFFECB50)
: Color(0xFF122F48)),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Stack(
alignment: projectViewModel.isArabic ? Alignment.centerLeft : Alignment.centerRight,
children: [
Column(
Container(
width: double.infinity,
decoration: containerRadiusWithGradient(0,
color1: timeCalculator(6, 0, 10, 59)
? Color(0xFFB3E3FE)
: timeCalculator(11, 0, 15, 59)
? Color(0xFFFF9E7E)
: Color(0xFF2E6686),
color2: timeCalculator(6, 0, 10, 59)
? Color(0xFF9AC7FF)
: timeCalculator(11, 0, 15, 59)
? Color(0xFFFECB50)
: Color(0xFF122F48)),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Directionality(
@ -134,7 +132,6 @@ class _AllHabibMedicalSevicePage2State extends State<AllHabibMedicalSevicePage2>
color: Colors.white,
),
),
mFlex(0),
Text(
TranslationBase.of(context).healthWeatherIndicators,
style: TextStyle(
@ -153,31 +150,34 @@ class _AllHabibMedicalSevicePage2State extends State<AllHabibMedicalSevicePage2>
color: Colors.white,
),
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: HealthWeatherIndicator(),
),
);
},
child: Padding(
padding: const EdgeInsets.only(top: 0, bottom: 0),
child: Text(
TranslationBase.of(context).moreDetails,
style: TextStyle(fontSize: 12, letterSpacing: -0.72, fontWeight: FontWeight.w600, color: Colors.white, decoration: TextDecoration.underline),
),
),
)
],
),
Image.asset(
"assets/images/Weather_ico.png",
color: Colors.white.withOpacity(0.5),
),
],
),
),
Column(
children: [
SvgPicture.asset(
"assets/images/new/cloudy.svg",
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: HealthWeatherIndicator(),
),
);
},
child: Padding(
padding: const EdgeInsets.only(top: 10, bottom: 0),
child: Text(
TranslationBase.of(context).moreDetails,
style: TextStyle(fontSize: 12, letterSpacing: -0.72, fontWeight: FontWeight.w600, color: Colors.white, decoration: TextDecoration.underline),
),
),
)
],
),
],
),
),
),

@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/weather_slider/weather_slider.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class HealthWeatherIndicator extends StatefulWidget {
@ -49,28 +50,25 @@ class _HospitalsPageState extends State<HealthWeatherIndicator> {
body: mode.weatherIndicatorData.length > 0
? SingleChildScrollView(
child: Column(children: [
AspectRatio(
aspectRatio: 2.3,
child: Container(
width: double.infinity,
height: double.infinity,
decoration: containerRadiusWithGradient(0,
color1: timeCalculator(6, 0, 10, 59)
? Color(0xFFB3E3FE)
: timeCalculator(11, 0, 15, 59)
? Color(0xFFFF9E7E)
: Color(0xFF2E6686),
color2: timeCalculator(6, 0, 10, 59)
? Color(0xFF9AC7FF)
: timeCalculator(11, 0, 15, 59)
? Color(0xFFFECB50)
: Color(0xFF122F48)),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Stack(
alignment: projectViewModel.isArabic ? Alignment.centerLeft : Alignment.centerRight,
children: [
Column(
Container(
width: double.infinity,
decoration: containerRadiusWithGradient(0,
color1: timeCalculator(6, 0, 10, 59)
? Color(0xFFB3E3FE)
: timeCalculator(11, 0, 15, 59)
? Color(0xFFFF9E7E)
: Color(0xFF2E6686),
color2: timeCalculator(6, 0, 10, 59)
? Color(0xFF9AC7FF)
: timeCalculator(11, 0, 15, 59)
? Color(0xFFFECB50)
: Color(0xFF122F48)),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Directionality(
@ -94,7 +92,6 @@ class _HospitalsPageState extends State<HealthWeatherIndicator> {
color: Colors.white,
),
),
mFlex(0),
Text(
TranslationBase.of(context).healthWeatherIndicators,
style: TextStyle(
@ -115,12 +112,11 @@ class _HospitalsPageState extends State<HealthWeatherIndicator> {
),
],
),
Image.asset(
"assets/images/Weather_ico.png",
color: Colors.white.withOpacity(0.5),
),
],
),
),
SvgPicture.asset(
"assets/images/new/cloudy.svg",
),
],
),
),
),

@ -4,15 +4,12 @@ import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model
import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/add_new_child_view_model.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/active_medications/DayCheckBoxDialog.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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -72,11 +69,11 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
@override
Widget build(BuildContext context) {
return BaseView<AddNewChildViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).vaccination,
showNewAppBarTitle: true,
showNewAppBar: true,
body: Container(
child: Column(
@ -253,12 +250,9 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
width: double.infinity,
padding: EdgeInsets.all(16),
color: Colors.white,
child: SecondaryButton(
textColor: Colors.white,
color: checkedValue == false ? Colors.white24 : CustomColors.accentColor,
label: TranslationBase.of(context).add,
//
onTap: () async {
child: DefaultButton(
TranslationBase.of(context).add,
() async {
newChild.babyName = _firstTextController.text + " " + _secondTextController.text;
newChild.gender = checkedValue.toString();
newChild.strDOB = getStartDay();

@ -1,13 +1,12 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -126,12 +125,9 @@ class _ChildVaccinesPageState extends State<ChildInitialPage> with SingleTickerP
},
),
if (checkedValue) mHeight(16),
SecondaryButton(
textColor: Colors.white,
color: CustomColors.accentColor,
label: TranslationBase.of(context).viewListChildren,
//
onTap: () => Navigator.push(
DefaultButton(
TranslationBase.of(context).viewListChildren,
() => Navigator.push(
context,
FadePage(
page: ChildVaccinePage(),

@ -1,13 +1,11 @@
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
@ -56,7 +54,7 @@ class _ChildPageState extends State<ChildVaccinePage> with SingleTickerProviderS
);
},
child: Container(
margin: EdgeInsets.only(left: 16, right: 16,top: index==0?16:0,bottom: index==model.babyInformationModelList.length-1?16:0),
margin: EdgeInsets.only(left: 16, right: 16, top: index == 0 ? 16 : 0, bottom: index == model.babyInformationModelList.length - 1 ? 16 : 0),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(12)),
@ -111,7 +109,7 @@ class _ChildPageState extends State<ChildVaccinePage> with SingleTickerProviderS
color: selectedColor,
),
),
Text(DateUtil.yearMonthDay(model.babyInformationModelList[index].dOB),
Text(" " + DateUtil.getDayMonthYearDateFormatted(model.babyInformationModelList[index].dOB),
style: TextStyle(
fontSize: 11,
color: selectedColor,
@ -137,7 +135,7 @@ class _ChildPageState extends State<ChildVaccinePage> with SingleTickerProviderS
}
},
child: Container(
decoration: containerRadius(Colors.black.withOpacity(0.2), 2000),
decoration: containerRadius(Colors.grey.withOpacity(0.2), 2000),
padding: EdgeInsets.only(left: 12, right: 12, top: 8, bottom: 8),
child: Row(
children: [
@ -175,19 +173,9 @@ class _ChildPageState extends State<ChildVaccinePage> with SingleTickerProviderS
width: double.infinity,
padding: EdgeInsets.all(16),
color: Colors.white,
child: SecondaryButton(
textColor: Colors.white,
color: checkedValue
? CustomColors.accentColor
: Color.fromRGBO(
63,
72,
74,
1,
),
label: TranslationBase.of(context).addNewChild,
//
onTap: () {
child: DefaultButton(
TranslationBase.of(context).addNewChild,
() {
Navigator.push(
context,
FadePage(

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-order-list-item.dart';
@ -11,7 +12,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
class RRTLogPage extends StatefulWidget {
final List<PrescriptionsOrder> orders;
final List<GetCMCAllOrdersResponseModel> orders;
const RRTLogPage({this.orders});
@ -45,13 +46,13 @@ class RRTLogPageState extends State<RRTLogPage> {
});
}
deleteOrder(PrescriptionsOrder order) async {
deleteOrder(GetCMCAllOrdersResponseModel order) async {
GifLoaderDialogUtils.showMyDialog(context);
var success = await viewModel.cancelOrder(order);
var success = await viewModel.cancelOrderRC(order);
if (success) {
viewModel.setState(ViewState.Busy);
await viewModel.getAllOrders();
await viewModel.getAllOrdersRC();
viewModel.setState(ViewState.Idle);
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen));
Navigator.push(context, FadePage(page: RRTMainScreen()));

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
@ -7,10 +8,13 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class RRTMainScreen extends StatefulWidget {
final index = 0;
RRTMainScreen({index});
@override
State<StatefulWidget> createState() => RRTMainScreenState();
}
@ -25,6 +29,8 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderS
List<ImagesInfo> imagesInfo = List();
ProjectViewModel projectViewModel;
@override
void initState() {
super.initState();
@ -36,6 +42,7 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderS
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
localize = TranslationBase.of(context);
return AppScaffold(
@ -80,20 +87,40 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderS
margin: EdgeInsets.all(0.0),
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar(onTap: onPageChanged, indicatorWeight: 3, indicatorColor: Color(0xFFc5272d), isScrollable: false, controller: tabController, indicatorSize: TabBarIndicatorSize.label, tabs: [
Tab(
child: Text(
localize.rapidResponseTeam,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
child: TabBar(
onTap: onPageChanged,
controller: tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 5, bottom: 5),
labelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 15,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
),
Tab(
child: Text(
localize.orderLog,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
unselectedLabelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 15,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
),
]),
tabs: [
Tab(
child: Text(
localize.rapidResponseTeam,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
),
Tab(
child: Text(
localize.orderLog,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
),
]),
);
Widget contentPager() => PageView(

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -16,8 +17,8 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
final _item_content_seperator = Container(height: 0.25, padding: EdgeInsets.all(10), color: Colors.grey.withOpacity(0.5));
class RRTLogListItem extends StatefulWidget {
final PrescriptionsOrder order;
final Function(PrescriptionsOrder) onCancel;
final GetCMCAllOrdersResponseModel order;
final Function(GetCMCAllOrdersResponseModel) onCancel;
RRTLogListItem(this.order, {this.onCancel});
@override
@ -34,8 +35,8 @@ class RRTLogListItemState extends State<RRTLogListItem> {
ProjectViewModel projectViewModel = Provider.of(context);
localize = TranslationBase.of(context);
int status = widget.order.status;
String _statusDisp = projectViewModel.isArabic ? widget.order.descriptionN : widget.order.description;
int status = widget.order.statusId;
String _statusDisp = widget.order.statusText;
Color _color;
if (status == 1) {
//pending
@ -46,7 +47,7 @@ class RRTLogListItemState extends State<RRTLogListItem> {
} else if (status == 3) {
//completed
_color = Color(0xff359846);
} else if (status == 4) {
} else if (status == 4 || status == 6 || status == 7) {
//cancel // Rejected
_color = Color(0xffD02127);
}
@ -111,7 +112,7 @@ class RRTLogListItemState extends State<RRTLogListItem> {
),
Expanded(
child: Text(
!projectViewModel.isArabic ? widget.order.nearestProjectDescription.trim().toString() : widget.order.nearestProjectDescriptionN.toString(),
widget.order.projectName.toString(),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
),
),
@ -126,7 +127,7 @@ class RRTLogListItemState extends State<RRTLogListItem> {
),
Expanded(
child: Text(
widget.order.getFormattedDateTime(),
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.order.created)),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
),
),
@ -140,11 +141,11 @@ class RRTLogListItemState extends State<RRTLogListItem> {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.getDayMonthYearDateFormattedLang(widget.order.createdOn, projectViewModel.isArabic),
DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.order.created)),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
SizedBox(height: 12),
if (widget.order.status == 1 || widget.order.status == 2)
if (widget.order.statusId == 1 || widget.order.statusId == 2)
InkWell(
onTap: () {
//onCancel(order);
@ -227,11 +228,11 @@ class RRTLogListItemState extends State<RRTLogListItem> {
// );
cancelOrders(order) async {
GifLoaderDialogUtils.showMyDialog(context);
var success = await viewModel.cancelOrder(order);
var success = await viewModel.cancelOrderRC(order);
if (success) {
viewModel.setState(ViewState.Busy);
await viewModel.getAllOrders();
await viewModel.getAllOrdersRC();
viewModel.setState(ViewState.Idle);
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen));
Navigator.push(context, FadePage(page: RRTMainScreen()));

@ -217,7 +217,7 @@ class RRTPlaceOrderPage extends StatelessWidget {
gotoRRTRoot() async {
viewModel.setState(ViewState.Busy);
await viewModel.getAllOrders();
await viewModel.getAllOrdersRC();
viewModel.setState(ViewState.Idle);
Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: RRTMainScreen));
Navigator.push(_context, FadePage(page: RRTMainScreen()));

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/models/rrt/service_price.dart';
@ -15,7 +16,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class RRTRequestPage extends StatefulWidget {
final List<PrescriptionsOrder> pendingOrders;
final List<GetCMCAllOrdersResponseModel> pendingOrders;
final ServicePrice servicePrice;
RRTRequestPage({this.pendingOrders, this.servicePrice});
@ -208,14 +209,14 @@ class RRTRequestPageState extends State<RRTRequestPage> {
)));
}
deleteOrder(PrescriptionsOrder order) async {
deleteOrder(GetCMCAllOrdersResponseModel order) async {
GifLoaderDialogUtils.showMyDialog(context);
var success = await viewModel.cancelOrder(order);
var success = await viewModel.cancelOrderRC(order);
GifLoaderDialogUtils.hideDialog(context);
if (success)
setState(() {
widget.pendingOrders.remove(order);
});
await viewModel.getAllOrders();
await viewModel.getAllOrdersRC();
}
}

@ -621,19 +621,18 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
size: 18,
color: Colors.blue,),
onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.finalProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.finalProducts[index].id);
// GifLoaderDialogUtils.hideDialog(context);
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(page: CartOrderPage()),
);
FadePage(page: CartOrderPage()));
}
else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription);
}
GifLoaderDialogUtils.hideDialog(context);
//
}
),

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/theme/colors.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';
@ -113,9 +114,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
),
Text(
convertDateFormat(
model.insurance[index].cardValidTo,
),
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.insurance[index].cardValidTo)),
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
),
],

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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';
@ -344,59 +345,6 @@ class InsuranceCardUpdateDetails extends StatelessWidget {
),
],
),
// bottomSheet: Container(
// width: double.infinity,
// height: insuranceCardDetailsModel.isEmpty ? MediaQuery.of(context).size.height * 0.14 : MediaQuery.of(context).size.height * 0.21,
// child: Container(
// margin: EdgeInsets.only(left: 8, right: 8),
// child: Column(
// children: [
// SizedBox(
// height: 8,
// ),
// if (insuranceCardDetailsModel.isEmpty)
// SecondaryButton(
// textColor: Colors.white,
// label: TranslationBase.of(context).scanNow.toUpperCase(),
// color: Theme.of(context).primaryColor,
// small: true,
// onTap: () async {
// confirmAttachInsuranceCardImageDialogDialog(context: context, name: name, fileNo: patientID.toString(), model: model);
// },
// ),
// if (insuranceCardDetailsModel.isNotEmpty)
// SecondaryButton(
// textColor: Colors.white,
// label: TranslationBase.of(context).agree.toUpperCase(),
// color: Theme.of(context).primaryColor,
// onTap: () async {
// GifLoaderDialogUtils.showMyDialog(context);
// await model.uploadInsuranceCard(patientIdentificationID: patientIdentificationID, patientID: patientID);
// GifLoaderDialogUtils.hideDialog(context);
// if (model.state == ViewState.ErrorLocal) {
// AppToast.showErrorToast(message: model.error);
// } else {
// AppToast.showSuccessToast(message: TranslationBase.of(context).requestSent);
// }
// },
// ),
// if (insuranceCardDetailsModel.isNotEmpty)
// SizedBox(
// height: 12,
// ),
// if (insuranceCardDetailsModel.isNotEmpty)
// SecondaryButton(
// textColor: Colors.white,
// label: TranslationBase.of(context).disagree.toUpperCase(),
// color: Colors.grey[800],
// onTap: () async {
// confirmAttachInsuranceCardImageDialogDialog(context: context, name: name, fileNo: patientID.toString(), model: model);
// },
// )
// ],
// ),
// ),
// ),
),
);
}

@ -94,6 +94,7 @@ class InsurancePage extends StatelessWidget {
},
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 12.0),
child: Container(
decoration: cardRadius(12),
child: Padding(

@ -421,8 +421,7 @@ class _HomePageState extends State<HomePage> {
padding: const EdgeInsets.only(bottom: 15, right: 15, left: 15),
child: InkWell(
onTap: () {
final user = projectViewModel.user;
Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesHomePage(user)));
Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesHomePage(projectViewModel.user)));
},
child: Container(
decoration: BoxDecoration(

@ -512,9 +512,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
model = Provider.of<ToDoCountProviderModel>(context);
// currentTab == 0 ? 45 : 0.0
return Scaffold(
appBar: PreferredSize(
appBar: currentTab == 0 ? PreferredSize(
preferredSize: Size.fromHeight(currentTab == 0 ? 45 : 0.0),
child: AppBar(
elevation: 0,
@ -598,7 +598,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
],
centerTitle: true,
),
),
) : null,
drawer: SafeArea(child: AppDrawer()),
extendBody: false,
body: WillPopScope(

@ -170,11 +170,11 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
),
InkWell(
onTap: (){
// Navigator.pop(context, "schedule");
Navigator.pop(context, "schedule");
},
child: Container(
decoration: BoxDecoration(
color: Colors.grey[400],
color: Colors.grey[600],
borderRadius: BorderRadius.all(Radius.circular(10.0))),
height: 100.0,
margin: EdgeInsets.only(top: 20.0),

@ -89,7 +89,7 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
),
tabs: [
Tab(text: TranslationBase.of(context).weekly),
Tab(text: TranslationBase.of(context).monthly),
Tab(text: TranslationBase.of(context).monthlyTab),
Tab(text: TranslationBase.of(context).yearly),
],
onTap: (value) {
@ -262,6 +262,7 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
timeSeries: weeklyTimeSeriesData,
indexes: weeklyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8,
isWeeklyOrMonthly: true,
),
),
Container(
@ -337,6 +338,7 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
timeSeries: monthlyTimeSeriesData,
indexes: monthlyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8,
isWeeklyOrMonthly: true,
),
),
Container(

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/dista
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -30,118 +31,35 @@ class _HealthDataListState extends State<HealthDataList> {
@override
Widget build(BuildContext context) {
List<Widget> myMedicalList = myOptionsList(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).smartWatches,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: Container(
height: MediaQuery.of(context).size.height,
margin: EdgeInsets.all(20.0),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: HeartRateTracker(),
),
);
},
child: Row(
children: [
Container(
child: Image.asset("assets/images/SmartWatches/heartrate_icon.png", width: 60.0, height: 60.0),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
child: Text(TranslationBase.of(context).heart, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
),
),
Divider(
color: Colors.grey[500],
),
Row(
children: [
Container(
child: Image.asset("assets/images/SmartWatches/sleep_data.png", width: 60.0, height: 60.0),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
child: Text("Sleep Data", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
Container(
width: double.infinity,
height: 20,
),
Divider(
color: Colors.grey[500],
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: StepsTracker(),
),
);
},
child: Row(
children: [
Container(
child: Image.asset("assets/images/SmartWatches/heartrate_icon.png", width: 60.0, height: 60.0),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
child: Text(TranslationBase.of(context).steps, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
Padding(
padding: EdgeInsets.only(left: 12, right: 12),
child: GridView.builder(
shrinkWrap: true,
primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: myMedicalList.length,
itemBuilder: (BuildContext context, int index) {
return myMedicalList[index];
},
),
),
Divider(
color: Colors.grey[500],
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: DistanceTracker(),
),
);
},
child: Row(
children: [
Container(
child: Image.asset("assets/images/SmartWatches/heartrate_icon.png", width: 60.0, height: 60.0),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
child: Text(TranslationBase.of(context).distance, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
),
),
Divider(
color: Colors.grey[500],
),
// Row(
// children: [
// Container(
// child: Image.asset("assets/images/SmartWatches/heartrate_icon.png", width: 60.0, height: 60.0),
// ),
// Container(
// margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0),
// child: Text("Energy", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
// ),
// ],
// ),
// Divider(
// color: Colors.grey[500],
// ),
],
),
),
@ -159,6 +77,53 @@ class _HealthDataListState extends State<HealthDataList> {
);
}
List<Widget> myOptionsList(BuildContext context) {
List<Widget> medical = List();
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: HeartRateTracker()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).heart,
imagePath: 'assets/images/SmartWatches/heartrate_icon.png',
subTitle: null,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: StepsTracker()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).steps,
imagePath: 'assets/images/SmartWatches/steps.png',
subTitle: null,
isPngImage: true,
),
));
medical.add(InkWell(
onTap: () => Navigator.push(
context,
FadePage(page: DistanceTracker()),
),
child: MedicalProfileItem(
title: TranslationBase.of(context).distance,
imagePath: 'assets/images/SmartWatches/distance.png',
subTitle: null,
isPngImage: true,
),
));
return medical;
}
// void readLast() async {
// print("ReadLast");
// final result = await FitKit.readLast(DataType.DISTANCE);

@ -89,7 +89,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
),
tabs: [
Tab(text: TranslationBase.of(context).weekly),
Tab(text: TranslationBase.of(context).monthly),
Tab(text: TranslationBase.of(context).monthlyTab),
Tab(text: TranslationBase.of(context).yearly),
],
onTap: (value) {
@ -99,7 +99,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
} else if (value == 1) {
getMonthlyHeartRateData();
} else {
// getYearlyHeartRateData();
getYearlyHeartRateData();
}
},
),
@ -109,11 +109,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
children: [
isWeeklyDataLoaded ? getWeeklyHeartRateDetails() : Container(),
isMonthlyDataLoaded ? getMonthlyHeartRateDetails() : Container(),
// isYearlyDataLoaded ? getYearlyDistanceDetails() : Container()
// Container(),
// Container(),
Container()
isYearlyDataLoaded ? getYearlyHeartRateDetails() : Container()
],
controller: _tabController,
),
@ -183,13 +179,13 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
yearlyDataLength = 0;
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getPatientHealthDataStats(7, 3, context).then((res) {
service.getPatientHealthDataStats(3, 3, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
yearlyHearRateList.clear();
res['Med_GetYearTransactionsStsList'].forEach((element) {
yearlyHearRateList.add(new YearlyHeartRateResModel.fromJson(element));
if (element['ValueSum'] != null) {
num value = element['ValueSum'];
if (element['ValueAvg'] != null) {
num value = element['ValueAvg'];
avgYearlyHearRateValue += value;
yearlyDataLength++;
}
@ -264,6 +260,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
timeSeries: weeklyTimeSeriesData,
indexes: weeklyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8,
isWeeklyOrMonthly: true,
),
),
Container(
@ -339,6 +336,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
timeSeries: monthlyTimeSeriesData,
indexes: monthlyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8,
isWeeklyOrMonthly: true,
),
),
Container(
@ -424,11 +422,11 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
children: [
Container(
padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0),
child: Text(TranslationBase.of(context).avgDistance, style: TextStyle(fontSize: 18.0)),
child: Text(TranslationBase.of(context).avgHeartRate, style: TextStyle(fontSize: 18.0)),
),
Container(
margin: EdgeInsets.only(bottom: 10.0),
child: Text(yearlyStatsAvgValue.toString() + " " + TranslationBase.of(context).km_, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
child: Text(yearlyStatsAvgValue.toString() + " " + TranslationBase.of(context).bpm, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
),
],
),

@ -6,8 +6,11 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/theme/colors.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/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@ -24,13 +27,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
bool hasAlreadySynced = false;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
if(authenticatedUserObject.isLogin) getLastPatientRecord(context);
if (authenticatedUserObject.isLogin) getLastPatientRecord(context);
});
super.initState();
}
@ -49,9 +51,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/1.png')
],
body: Container(
child: Platform.isIOS
? _getAppleWatchInstructions()
: _getGoogleWatchInstructions(),
child: Platform.isIOS ? _getAppleWatchInstructions() : _getGoogleWatchInstructions(),
));
}
@ -65,10 +65,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
// margin: EdgeInsets.only(top: 10.0),
child: CarouselSlider(
carouselController: buttonCarouselController,
options: CarouselOptions(
enableInfiniteScroll: false,
viewportFraction: 0.95,
height: MediaQuery.of(context).size.height * 0.9),
options: CarouselOptions(enableInfiniteScroll: false, viewportFraction: 0.95, height: MediaQuery.of(context).size.height * 0.65),
items: [1, 2].map((i) {
return Builder(
builder: (BuildContext context) {
@ -83,33 +80,24 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
child: i == 1
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Supported Smartwatches",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold)),
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).supportedWatches, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
),
Container(
child: Row(
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 10.0),
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/apple-watch-1.jpeg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/apple-watch-1.jpeg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text(
"Apple Watch Series 1", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 1", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -117,20 +105,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 10.0),
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/apple-watch-2.jpg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/apple-watch-2.jpg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text(
"Apple Watch Series 2", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -145,20 +126,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/apple-watch-3.jpg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/apple-watch-3.jpg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text(
"Apple Watch Series 3", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -166,20 +140,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/apple-watch-4.jpg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/apple-watch-4.jpg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text(
"Apple Watch Series 4", overflow: TextOverflow.clip ,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -194,20 +161,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/apple-watch-5.jpg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/apple-watch-5.jpg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text(
"Apple Watch Series 5", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 5", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -215,20 +175,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/Apple-Watch-6.png",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/Apple-Watch-6.png", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text(
"Apple Watch Series 6", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 6", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -243,19 +196,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/miBand3.jpg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text("Mi Band 3", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -263,19 +210,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/miBand4.jpg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text("Mi Band 4", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -285,143 +226,78 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
),
Container(
margin: EdgeInsets.fromLTRB(
10.0, 30.0, 10.0, 10.0),
child: Text(
"It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
margin: EdgeInsets.fromLTRB(10.0, 30.0, 10.0, 10.0),
child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"Before syncing data, please make sure that you have followed the instructions properly",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
child: Text(TranslationBase.of(context).syncInstructionsIntro2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
),
Container(
margin: EdgeInsets.all(15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
buttonCarouselController.nextPage();
},
child: Text("CONTINUE",
style: TextStyle(fontSize: 18.0)),
),
margin: EdgeInsets.fromLTRB(15.0, 40.0, 15.0, 0.0),
child: DefaultButton(
TranslationBase.of(context).continues,
() {
buttonCarouselController.nextPage();
},
color: Color(0xff359846),
),
),
],
)
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Watch Instructions:",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "WorkSans")),
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Text(TranslationBase.of(context).watchInstructions, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
),
Container(
margin: EdgeInsets.fromLTRB(
10.0, 20.0, 10.0, 10.0),
child: Text(
"Before syncing data, please make sure that following instructions are met: ",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Text(TranslationBase.of(context).syncInstructionsIntro3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
),
Container(
margin: EdgeInsets.fromLTRB(
10.0, 20.0, 10.0, 10.0),
child: Text(
"1. Make sure that you have installed 'Health' App & 'Watch' App from Apple Store.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Text(TranslationBase.of(context).iosInstructions1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"2. Make sure that your Apple Watch is connected with the Watch & Health Apps.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Text(TranslationBase.of(context).iosInstructions2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"3. Make sure that data like heart rate, steps, distance etc. are being shown on your health app.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Text(TranslationBase.of(context).iosInstructions3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
),
Container(
margin: EdgeInsets.fromLTRB(
15.0, 80.0, 15.0, 15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
buttonCarouselController.nextPage();
},
child: Text("SYNC HEALTH DATA",
style: TextStyle(fontSize: 18.0)),
),
Padding(
padding: const EdgeInsets.fromLTRB(12.0, 50.0, 12.0, 20.0),
child: Row(
children: [
Expanded(
child: DefaultButton(
TranslationBase.of(context).syncHealthData,
() {},
color: Color(0xFFD02127),
disabledColor: Color(0xff28323A).withOpacity(0.3),
),
),
mWidth(12),
if (hasAlreadySynced)
Expanded(
child: DefaultButton(
TranslationBase.of(context).alreadySynced,
() {
_openHealthDataList();
},
color: Color(0xff359846),
),
),
],
),
),
hasAlreadySynced ? Container(
margin: EdgeInsets.fromLTRB(
15.0, 0.0, 15.0, 15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
_openHealthDataList();
},
child: Text("ALREADY SYNCED",
style: TextStyle(fontSize: 18.0)),
),
),
): Container(),
],
),
));
@ -447,7 +323,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
options: CarouselOptions(
// enableInfiniteScroll: true,
viewportFraction: 0.99,
height: MediaQuery.of(context).size.height*1.02 ),
height: MediaQuery.of(context).size.height * 0.9),
items: [1, 2].map((i) {
return Builder(
builder: (BuildContext context) {
@ -455,7 +331,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: MediaQuery.of(context).size.width,
margin: EdgeInsets.symmetric(horizontal: 5.0),
child: Card(
margin: EdgeInsets.only(top:16.0 , bottom: 8.0),
margin: EdgeInsets.only(top: 16.0, bottom: 8.0),
// fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white.withOpacity(1.0),
shape: RoundedRectangleBorder(
@ -463,34 +339,24 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
child: i == 1
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Supported Smartwatches",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "WorkSans")),
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).supportedWatches, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
),
Container(
child: Row(
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 10.0),
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/huawei-watch-2.png",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/huawei-watch-2.png", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text(
"Huawei Watch 2", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Huawei Watch 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -498,21 +364,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 10.0),
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/ticwatche2.png",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text(
"Mobovi TicWatch E2",
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mobovi TicWatch E2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -527,19 +385,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/huawei-watch-2-classic.png",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/huawei-watch-2-classic.png", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text("Huawei Watch", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Huawei Watch", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -547,19 +399,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/ticwatche2.png",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text("Fossil Sport", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Fossil Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -574,20 +420,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/misfit-vapor-2.jpg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/misfit-vapor-2.jpg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text(
"MisFit Vapor 2", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("MisFit Vapor 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -595,20 +434,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/lg-watch-sport.jpg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/lg-watch-sport.jpg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text(
"LG Watch Sport", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("LG Watch Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -623,19 +455,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/miBand3.jpg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text("Mi Band 3", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -643,19 +469,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
Expanded(
child: Container(
margin:
EdgeInsets.only(top: 15.0),
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset(
"assets/images/SmartWatches/miBand4.jpg",
width: 70.0,
height: 70.0),
Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0),
Container(
width: MediaQuery.of(context).size.width*0.22,
child: Text("Mi Band 4", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
)
],
),
@ -666,162 +486,135 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
),
InkWell(
onTap: () {
launch(
"https://wearos.google.com/#find-your-watch");
launch("https://wearos.google.com/#find-your-watch");
},
child: Container(
margin: EdgeInsets.only(top: 20.0),
child: Text(
"More Supported Smartwatches...",
style: TextStyle(
fontSize: 17.0,
color: Colors.blue,
decoration:
TextDecoration.underline)),
margin: EdgeInsets.only(top: 20.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).moreSupportedWatches,
textAlign: TextAlign.center, style: TextStyle(fontSize: 14.0, color: Colors.blue, decoration: TextDecoration.underline, letterSpacing: -0.36)),
),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"Before syncing data, please make sure that you have followed the instructions properly",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
child: Text(TranslationBase.of(context).syncInstructionsIntro2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
),
Container(
margin: EdgeInsets.all(15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
buttonCarouselController.nextPage();
},
child: Text("CONTINUE",
style: TextStyle(fontSize: 18.0)),
),
child: DefaultButton(
TranslationBase.of(context).continues,
() {
buttonCarouselController.nextPage();
},
color: CustomColors.green,
),
),
],
)
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text("Watch Instructions:",
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "WorkSans")),
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).watchInstructions, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"Before syncing data, please make sure that following instructions are met: ",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
child: Text(TranslationBase.of(context).syncInstructionsIntro3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"1. Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
child: Text(TranslationBase.of(context).androidInstructions1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"2. Make sure that you have installed your watch related apps from Google PlayStore.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
child: Text(TranslationBase.of(context).androidInstructions2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"3. Make sure that your Smart Watch is connected with the WearOS app & your watch apps.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
child: Text(TranslationBase.of(context).androidInstructions3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
),
Container(
margin: EdgeInsets.all(10.0),
child: Text(
"4. Make sure that your smart watch apps are linked/associated with Google Fit App.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
child: Text(TranslationBase.of(context).androidInstructions4, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
),
Container(
margin: EdgeInsets.fromLTRB(
15.0, 75.0, 15.0, 15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
buttonCarouselController.nextPage();
},
child: Text("SYNC HEALTH DATA",
style: TextStyle(fontSize: 18.0)),
),
Padding(
padding: const EdgeInsets.fromLTRB(12.0, 50.0, 12.0, 20.0),
child: Row(
children: [
Expanded(
child: DefaultButton(
TranslationBase.of(context).syncHealthData,
() {},
color: Color(0xFFD02127),
disabledColor: Color(0xff28323A).withOpacity(0.3),
),
),
mWidth(12),
if (hasAlreadySynced)
Expanded(
child: DefaultButton(
TranslationBase.of(context).alreadySynced,
() {
_openHealthDataList();
},
color: Color(0xff359846),
),
),
],
),
),
hasAlreadySynced ? Container(
margin: EdgeInsets.fromLTRB(
15.0, 0.0, 15.0, 15.0),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(10.0),
),
minWidth:
MediaQuery.of(context).size.width,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
_openHealthDataList();
},
child: Text("ALREADY SYNCED",
style: TextStyle(fontSize: 18.0)),
),
),
) : Container(),
// Container(
// margin: EdgeInsets.fromLTRB(15.0, 75.0, 15.0, 15.0),
// child: ButtonTheme(
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10.0),
// ),
// minWidth: MediaQuery.of(context).size.width,
// height: 45.0,
// child: RaisedButton(
// color: new Color(0xFF60686b),
// textColor: Colors.white,
// elevation: 0,
// disabledTextColor: Colors.white,
// disabledColor: new Color(0xFFbcc2c4),
// onPressed: () {
// buttonCarouselController.nextPage();
// },
// child: Text("SYNC HEALTH DATA", style: TextStyle(fontSize: 18.0)),
// ),
// ),
// ),
// hasAlreadySynced
// ? Container(
// margin: EdgeInsets.fromLTRB(15.0, 0.0, 15.0, 15.0),
// child: ButtonTheme(
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(10.0),
// ),
// minWidth: MediaQuery.of(context).size.width,
// height: 45.0,
// child: RaisedButton(
// color: new Color(0xFF60686b),
// textColor: Colors.white,
// elevation: 0,
// disabledTextColor: Colors.white,
// disabledColor: new Color(0xFFbcc2c4),
// onPressed: () {
// _openHealthDataList();
// },
// child: Text("ALREADY SYNCED", style: TextStyle(fontSize: 18.0)),
// ),
// ),
// )
// : Container(),
],
),
));

@ -89,7 +89,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
),
tabs: [
Tab(text: TranslationBase.of(context).weekly),
Tab(text: TranslationBase.of(context).monthly),
Tab(text: TranslationBase.of(context).monthlyTab),
Tab(text: TranslationBase.of(context).yearly),
],
onTap: (value) {
@ -258,6 +258,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
timeSeries: weeklyTimeSeriesData,
indexes: weeklyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8,
isWeeklyOrMonthly: true,
),
),
Container(
@ -333,6 +334,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
timeSeries: monthlyTimeSeriesData,
indexes: monthlyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8,
isWeeklyOrMonthly: true,
),
),
Container(

@ -1175,18 +1175,18 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
size: 18,
color: Colors.blue,),
onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.parentProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.parentProducts[index].id);
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(page: CartOrderPage()),
);
FadePage(page: CartOrderPage()));
}
else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription);
}
GifLoaderDialogUtils.hideDialog(context);
}
),

@ -32,6 +32,7 @@ class _ProductCheckTypeWidgetState extends State<ProductCheckTypeWidget> {
: widget.model.wishListList[index].product.name,
productPrice: widget.model.wishListList[index].subtotal,
productRate: double.parse(widget.model.wishListList[index].subtotalVatRate),
approvedTotalReviews:widget.model.wishListList[index].product.approvedTotalReviews,
productImage: widget.model.wishListList[index].product.images[0].src,
productID: widget.model.wishListList[index].product.id,
onDelete: deleteWishListItem,

@ -207,7 +207,7 @@ class _CartOrderPageState extends State<CartOrderPage> {
endIndent: 0,
),
Image.asset(
"assets/images/pharmacy_module/payment_image.png",
"assets/images/pharmacy_module/payment.png",
width: mediaQuery.size.width - 20,
height: 30.0,
fit: BoxFit.scaleDown,
@ -348,6 +348,7 @@ class _OrderBottomWidgetState extends State<OrderBottomWidget> {
Icons.info,
size: 25,
color: Color(0xff005aff),
// color: Color(0xff005aff),
),
),
),
@ -420,9 +421,9 @@ class _OrderBottomWidgetState extends State<OrderBottomWidget> {
isAgree ? Colors.white : Colors.grey.shade300,
fontSize: 14),
),
color: Color(0xff005aff),
elevation: 0,
disabledColor: Color(0xff005aff),
color: Color(0xFF4CAF50),
disabledColor:Color(0xFF4CAF50),
// disabledColor: Color(0xff005aff),
)
// RaisedButton(
// onPressed: isAgree

@ -41,10 +41,9 @@ class _CartOrderPageState extends State<CartOrderPage> {
final height = mediaQuery.size.height - 60 - mediaQuery.padding.top;
AppScaffold appScaffold;
return NetworkBaseView(
// baseViewModel: model,
isLoading: isLoading,
isLocalLoader: true,
child: AppScaffold(
child: appScaffold = AppScaffold(
appBarTitle: TranslationBase.of(context).shoppingCart,
isShowAppBar: true,
isPharmacy: true,

@ -20,6 +20,7 @@ class FooterWidget extends StatefulWidget {
final int quantityLimit;
final PharmacyProduct item;
final Function addToCartFunction;
final Function addToShoppingCartFunction;
final ProductDetailViewModel model;
int quantity;
@ -30,6 +31,7 @@ class FooterWidget extends StatefulWidget {
{this.quantity,
this.isOverQuantity = false,
this.addToCartFunction,
this.addToShoppingCartFunction,
this.model});
@override
@ -217,7 +219,7 @@ class _FooterWidgetState extends State<FooterWidget> {
widget.quantity > widget.quantityLimit ||
widget.item.rxMessage != null,
onTap: () async {
await widget.addToCartFunction(
await widget.addToShoppingCartFunction(
quantity: widget.quantity,
itemID: widget.item.id,
model: widget.model);

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-order-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-name-and-price.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/recommended_products.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/reviews_info.dart';
@ -13,6 +14,7 @@ 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/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'availability_info.dart';
@ -331,6 +333,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
quantity: quantity,
isOverQuantity: isOverQuantity,
addToCartFunction: addToCartFunction,
addToShoppingCartFunction: addToShoppingCartFunction,
model: model,
),
));
@ -355,6 +358,18 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
await model.addToCartData(quantity, itemID);
GifLoaderDialogUtils.hideDialog(context);
}
addToShoppingCartFunction(
{quantity,
itemID,
ProductDetailViewModel model}) async {
GifLoaderDialogUtils.showMyDialog(context);
await model.addToCartData(quantity, itemID);
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(page: CartOrderPage()));
}
}

@ -25,19 +25,9 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
final bool isInWishList;
final Function addToCartFunction;
ProductAppBar({Key key, this.product, this.model, this.addToWishlistFunction, this.quantity, this.deleteFromWishlistFunction, this.isInWishList, this.addToCartFunction}) : super(key: key);
ProductAppBar(
{Key key,
this.product,
this.model,
this.addToWishlistFunction,
this.quantity,
this.deleteFromWishlistFunction,
this.isInWishList, this.addToCartFunction})
: super(key: key);
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@override
Widget build(BuildContext context) {
@ -75,25 +65,29 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
onPress: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CartOrderPage()),
MaterialPageRoute(builder: (context) => CartOrderPage()),
);
}),
if(Provider.of<OrderPreviewViewModel>(context, listen: false).cartResponse.quantityCount !=0)
Positioned(
top:0, right: -1.0,
child: Container(
decoration: BoxDecoration(
color: Colors.red[800],
borderRadius: BorderRadius.circular(15),
if (Provider.of<OrderPreviewViewModel>(context, listen: false).cartResponse.quantityCount != 0)
Positioned(
top: 0,
right: -1.0,
child: Container(
decoration: BoxDecoration(
color: Colors.red[800],
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.only(left: 5, right: 4.5),
height: 18,
child: Center(
child: Texts(
Provider.of<OrderPreviewViewModel>(context, listen: false).cartResponse.quantityCount.toString(),
style: "caption",
medium: true,
color: Colors.white,
)),
),
padding: EdgeInsets.only(left: 5, right: 4.5),
height: 18,
child: Center(child: Texts(Provider.of<OrderPreviewViewModel>(context, listen: false).cartResponse.quantityCount.toString(), style: "caption", medium: true, color: Colors.white,)),
),
)
)
],
),
SizedBox(
@ -135,16 +129,12 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
onTap: () async {
if (quantity > 0) {
{
await addToCartFunction(
quantity: quantity,
itemID: itemID,
model: model);
await addToCartFunction(quantity: quantity, itemID: itemID, model: model);
Navigator.of(context).pop();
}
} else {
AppToast.showErrorToast(
message: "you should add quantity");
AppToast.showErrorToast(message: "you should add quantity");
}
}),
ListTile(
@ -153,9 +143,7 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
color: !isInWishList ? Colors.white : Colors.red[800],
),
title: Text(
isInWishList
? TranslationBase.of(context).removeFromWishlist
: TranslationBase.of(context).addToWishlist,
isInWishList ? TranslationBase.of(context).removeFromWishlist : TranslationBase.of(context).addToWishlist,
),
onTap: () async {
if (isInWishList)
@ -170,8 +158,7 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
TranslationBase.of(context).compare,
),
onTap: () {
Provider.of<CompareList>(context, listen: false)
.addItem(specificationData);
Provider.of<CompareList>(context, listen: false).addItem(specificationData);
Navigator.of(context).pop();
},
),

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
class ProductOrderItem extends StatefulWidget {
@ -39,7 +40,7 @@ class _ProductOrderItemState extends State<ProductOrderItem> {
leading: InkWell(
onTap: () => {widget.deleteCartItems()},
child: Icon(
Icons.delete_outline_sharp,
FontAwesomeIcons.trashAlt,size: 15,
color: Colors.grey.shade700,
),
),

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_home_page.dart';
import 'package:diplomaticquarterapp/pages/search_products_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
@ -44,6 +45,9 @@ class GridViewButtons extends StatelessWidget {
hasColorFilter: false,
child: GridViewCard(TranslationBase.of(context).medicationRefill,
'assets/images/pharmacy_module/medication_icon.png', () {
Navigator.push(
context, FadePage(page: HomePrescriptionsPage()));
// model.checkUserIsActivated().then((isActivated) {
// if (isActivated) {
// Navigator.push(context, FadePage(page: LakumMainPage()));
@ -71,7 +75,7 @@ class GridViewButtons extends StatelessWidget {
child: GridViewCard(
TranslationBase.of(context).searchAndScanMedication,
'assets/images/pharmacy_module/search_scan_icon.png',
() {}),
() {Navigator.push(context, FadePage(page: SearchProductsPage()));}),
),
],
),

@ -69,6 +69,7 @@ class _OrderPageState extends State<OrderPage>
TabBar(
labelPadding: EdgeInsets.only(left: 3.0, right: 3.0),
labelColor: Colors.black,
indicatorColor: Colors.green,
tabs: [
Tab(text: TranslationBase.of(context).delivered),
Tab(text: TranslationBase.of(context).processing),
@ -126,86 +127,86 @@ class _OrderPageState extends State<OrderPage>
return Container(
child: Column(
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
deliveredOrderList[
index]),
));
},
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
),
),
),
Container(
child: Text(
deliveredOrderList[index]
.id
.toString(),
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
Container(
child: Text(
deliveredOrderList[index]
.id
.toString(),
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
SizedBox(
height: 5,
),
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderDate,
style: TextStyle(
fontSize: 14.0,
],
),
SizedBox(
height: 5,
),
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderDate,
style: TextStyle(
fontSize: 14.0,
),
),
),
),
Container(
child: Text(
deliveredOrderList[index]
.createdOnUtc
.toString()
.substring(0, 10),
style: TextStyle(
fontSize: 14.0,
Container(
child: Text(
deliveredOrderList[index]
.createdOnUtc
.toString()
.substring(0, 10),
style: TextStyle(
fontSize: 14.0,
),
),
),
),
],
),
],
],
),
],
),
),
),
Container(
margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
deliveredOrderList[
index]),
));
},
Container(
margin: EdgeInsets.all(8.0),
child: SvgPicture.asset(
languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg'
@ -214,8 +215,8 @@ class _OrderPageState extends State<OrderPage>
width: 20,
),
),
),
],
],
),
),
Divider(
color: Colors.grey[350],
@ -393,85 +394,85 @@ class _OrderPageState extends State<OrderPage>
return Container(
child: Column(
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
processingOrderList[
index])));
},
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
),
),
),
Container(
child: Text(
processingOrderList[index]
.id
.toString(),
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
Container(
child: Text(
processingOrderList[index]
.id
.toString(),
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
SizedBox(
height: 5,
),
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderDate,
style: TextStyle(
fontSize: 14.0,
],
),
SizedBox(
height: 5,
),
Row(
children: [
Container(
margin: EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderDate,
style: TextStyle(
fontSize: 14.0,
),
),
),
),
Container(
child: Text(
processingOrderList[index]
.createdOnUtc
.toString()
.substring(0, 10),
style: TextStyle(
fontSize: 14.0,
Container(
child: Text(
processingOrderList[index]
.createdOnUtc
.toString()
.substring(0, 10),
style: TextStyle(
fontSize: 14.0,
),
),
),
),
],
),
],
],
),
],
),
),
),
Container(
margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
processingOrderList[
index])));
},
Container(
margin: EdgeInsets.all(8.0),
child: SvgPicture.asset(
languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg'
@ -480,8 +481,8 @@ class _OrderPageState extends State<OrderPage>
width: 20,
),
),
),
],
],
),
),
Divider(
color: Colors.grey[350],
@ -836,87 +837,87 @@ class _OrderPageState extends State<OrderPage>
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Container(
margin:
EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
pendingOrderList[
index])));
},
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Container(
margin:
EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
),
),
),
Container(
child: Text(
pendingOrderList[index]
.id
.toString(),
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
Container(
child: Text(
pendingOrderList[index]
.id
.toString(),
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
SizedBox(
height: 5,
),
Row(
children: [
Container(
margin:
EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderDate,
style: TextStyle(
fontSize: 14.0,
],
),
SizedBox(
height: 5,
),
Row(
children: [
Container(
margin:
EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderDate,
style: TextStyle(
fontSize: 14.0,
),
),
),
),
Container(
child: Text(
pendingOrderList[index]
.createdOnUtc
.toString()
.substring(0, 10),
style: TextStyle(
fontSize: 14.0,
Container(
child: Text(
pendingOrderList[index]
.createdOnUtc
.toString()
.substring(0, 10),
style: TextStyle(
fontSize: 14.0,
),
),
),
),
],
),
],
],
),
],
),
),
),
Container(
margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
pendingOrderList[
index])));
},
Container(
margin: EdgeInsets.all(8.0),
child: SvgPicture.asset(
languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg'
@ -925,8 +926,8 @@ class _OrderPageState extends State<OrderPage>
width: 20,
),
),
),
],
],
),
),
Divider(
color: Colors.grey[350],
@ -1105,87 +1106,87 @@ class _OrderPageState extends State<OrderPage>
child: SingleChildScrollView(
child: Column(
children: <Widget>[
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Container(
margin:
EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
cancelledOrderList[
index])));
},
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
margin: EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Row(
children: [
Container(
margin:
EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderNumber,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
),
),
),
Container(
child: Text(
cancelledOrderList[index]
.id
.toString(),
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
Container(
child: Text(
cancelledOrderList[index]
.id
.toString(),
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
SizedBox(
height: 5,
),
Row(
children: [
Container(
margin:
EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderDate,
style: TextStyle(
fontSize: 14.0,
],
),
SizedBox(
height: 5,
),
Row(
children: [
Container(
margin:
EdgeInsets.only(right: 5),
child: Text(
TranslationBase.of(context)
.orderDate,
style: TextStyle(
fontSize: 14.0,
),
),
),
),
Container(
child: Text(
cancelledOrderList[index]
.createdOnUtc
.toString()
.substring(0, 10),
style: TextStyle(
fontSize: 14.0,
Container(
child: Text(
cancelledOrderList[index]
.createdOnUtc
.toString()
.substring(0, 10),
style: TextStyle(
fontSize: 14.0,
),
),
),
),
],
),
],
],
),
],
),
),
),
Container(
margin: EdgeInsets.all(8.0),
child: InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: OrderDetailsPage(
orderModel:
cancelledOrderList[
index])));
},
Container(
margin: EdgeInsets.all(8.0),
child: SvgPicture.asset(
languageID == "ar"
? 'assets/images/pharmacy/arrow_left.svg'
@ -1194,8 +1195,8 @@ class _OrderPageState extends State<OrderPage>
width: 20,
),
),
),
],
],
),
),
Divider(
color: Colors.grey[350],

@ -321,8 +321,7 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
margin: EdgeInsets.only(bottom: 10.0, top: 10.0),
child: Text(
model.orderListModel[0].paymentName
.toString()
.substring(12),
.toString(),
style: TextStyle(
fontSize: 13.0,
fontWeight: FontWeight.bold,

@ -1072,18 +1072,17 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
size: 18,
color: Colors.blue,),
onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.subProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.subProducts[index].id);
// GifLoaderDialogUtils.hideDialog(context);
GifLoaderDialogUtils.hideDialog(context);
Navigator.push(
context,
FadePage(page: CartOrderPage()),
);}
FadePage(page: CartOrderPage()));}
else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription);
}
GifLoaderDialogUtils.hideDialog(context);
}
),

@ -395,6 +395,15 @@ class DateUtil {
return "";
}
/// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted
static String getDayMonthDateFormatted(DateTime dateTime) {
if (dateTime != null)
return DateFormat('dd/MM').format(dateTime);
else
return "";
}
/// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted according to language
static String getDayMonthYearDateFormattedLang(DateTime dateTime, bool isArabic) {

@ -2485,7 +2485,9 @@ class TranslationBase {
String get mostViewed => localizedValues["mostViewed"][locale.languageCode];
String get newProducts => localizedValues["newProducts"][locale.languageCode];
String get enterDetails => localizedValues["enterDetails"][locale.languageCode];
String get paymentSelected => localizedValues["paymentSelected"][locale.languageCode];
String get moreNotifications => localizedValues["moreNotifications"][locale.languageCode];
@ -2531,6 +2533,36 @@ class TranslationBase {
String get avgDistance => localizedValues["avgDistance"][locale.languageCode];
String get avgHeartRate => localizedValues["avgHeartRate"][locale.languageCode];
String get alreadySynced => localizedValues["alreadySynced"][locale.languageCode];
String get syncInstructionsIntro1 => localizedValues["sync-instructions-intro1"][locale.languageCode];
String get syncInstructionsIntro2 => localizedValues["sync-instructions-intro2"][locale.languageCode];
String get syncInstructionsIntro3 => localizedValues["sync-instructions-intro3"][locale.languageCode];
String get iosInstructions1 => localizedValues["ios-instructions-1"][locale.languageCode];
String get iosInstructions2 => localizedValues["ios-instructions-2"][locale.languageCode];
String get iosInstructions3 => localizedValues["ios-instructions-3"][locale.languageCode];
String get supportedWatches => localizedValues["supportedWatches"][locale.languageCode];
String get watchInstructions => localizedValues["watchInstructions"][locale.languageCode];
String get monthlyTab => localizedValues["monthlyTab"][locale.languageCode];
String get moreSupportedWatches => localizedValues["moreSupportedWatches"][locale.languageCode];
String get androidInstructions1 => localizedValues["android-instructions-1"][locale.languageCode];
String get androidInstructions2 => localizedValues["android-instructions-2"][locale.languageCode];
String get androidInstructions3 => localizedValues["android-instructions-3"][locale.languageCode];
String get androidInstructions4 => localizedValues["android-instructions-4"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -10,8 +10,9 @@ class ShowChart extends StatelessWidget {
final List<TimeSeriesSales2> timeSeries;
final int indexes;
final double horizontalInterval;
final bool isWeeklyOrMonthly;
ShowChart({this.title, this.timeSeries, this.indexes, this.horizontalInterval = 8.0});
ShowChart({this.title, this.timeSeries, this.indexes, this.horizontalInterval = 8.0, this.isWeeklyOrMonthly = false});
List<int> xAxixs = List();
List<double> yAxixs = List();
@ -115,19 +116,23 @@ class ShowChart extends StatelessWidget {
rotateAngle: -65,
margin: 22,
getTitles: (value) {
if (timeSeries.length < 15) {
if (timeSeries.length > value.toInt()) {
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
} else
return '';
if(isWeeklyOrMonthly) {
return '${timeSeries[value.toInt()].time.day}/ ${timeSeries[value.toInt()].time.month}';
} else {
if (value.toInt() == 0) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (value.toInt() == timeSeries.length - 1) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (xAxixs.contains(value.toInt())) {
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (timeSeries.length < 15) {
if (timeSeries.length > value.toInt()) {
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
} else
return '';
} else {
if (value.toInt() == 0) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (value.toInt() == timeSeries.length - 1) return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (xAxixs.contains(value.toInt())) {
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
}
}
return '';
}
return '';
},
),
leftTitles: SideTitles(

@ -197,6 +197,7 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget {
return AppBar(
elevation: 0,
backgroundColor: showTitle ? Colors.white : Colors.transparent,
// backgroundColor: Colors.red,
// automaticallyImplyLeading: false,
leading: ArrowBack(
onTap: onTap,

@ -45,9 +45,9 @@ class BottomNavHomeItem extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(
height: 15,
),
// SizedBox(
// height: 15,
// ),
currentIndex == index
? Divider(
// color: Color(0xff5AB145),
@ -57,19 +57,24 @@ class BottomNavHomeItem extends StatelessWidget {
thickness: 0,
),
Container(
margin: EdgeInsets.only(bottom: 5.0),
child: Image.asset(
'assets/images/habib-logo.png',
),
height: 22.0,
),
SizedBox(
height: 9,
height: 5,
),
Texts(
title,
textAlign: TextAlign.start,
color: currentIndex == index ? Colors.grey : Colors.grey,
fontSize: 11,
Container(
margin: EdgeInsets.only(bottom: 7.0),
child: Texts(
title,
textAlign: TextAlign.start,
color: currentIndex == index ? Colors.grey : Colors.grey,
fontSize: 11,
),
),
// Added TextAlign Property
],

@ -39,7 +39,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
return Expanded(
child: SizedBox(
// height: 72.0,
height: 66.0,
child: Stack(
clipBehavior: Clip.none,
children: [
@ -63,17 +63,18 @@ class BottomNavPharmacyItem extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(
height: 15,
),
// SizedBox(
// height: 15,
// ),
currentIndex == index
? Divider(
color: Color(0xff5AB145),
color: Color(0xff5AB133),
thickness: 3.5,
)
: Divider(
thickness: 0,
),
Container(
child: Icon(currentIndex == index ? activeIcon : icon,
color: isHome
@ -81,7 +82,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
: currentIndex == index
? Colors.grey
: Colors.grey,
size: 22.0),
size: 20.0),
),
SizedBox(
height: 11,
@ -93,7 +94,7 @@ class BottomNavPharmacyItem extends StatelessWidget {
textAlign: TextAlign.center,
color: currentIndex == index ? Colors.grey : Colors.grey,
fontWeight: currentIndex == index
? FontWeight.bold
? FontWeight.normal
: FontWeight.w400,
fontSize: currentIndex == index ? 13 : 11,
),
@ -108,13 +109,13 @@ class BottomNavPharmacyItem extends StatelessWidget {
0)
Positioned(
top: 11.5,
right: -4.5,
right: -3.5,
child: Container(
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.only(left: 7, right: 6.5),
padding: EdgeInsets.only(left: 6.5, right: 6.5),
height: 18,
child: Center(
child: Texts(

@ -25,6 +25,7 @@ class productTile extends StatelessWidget {
final PharmacyProduct product;
final dynamic productID;
final Function onDelete;
final dynamic approvedTotalReviews;
// final VoidCallback deleteWishlistItems;
productTile(
@ -43,6 +44,8 @@ class productTile extends StatelessWidget {
this.product,
this.productID,
this.onDelete,
this.approvedTotalReviews,
});
@override
@ -112,22 +115,33 @@ class productTile extends StatelessWidget {
),
),
this.isOrderDetails == false
? Container(
margin: EdgeInsets.all(5),
child: Align(
alignment: Alignment.topLeft,
child: RatingBar.readOnly(
initialRating: productRate,
size: 15.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
? Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: EdgeInsets.all(5),
child: Align(
alignment: Alignment.topLeft,
child: RatingBar.readOnly(
initialRating: productRate,
size: 15.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
),
Text( '$approvedTotalReviews',
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.grey,
fontSize: 13),
),
)
],
)
: Container(),
],
),
@ -150,7 +164,9 @@ class productTile extends StatelessWidget {
height: 50,
),
IconButton(
icon: Icon(FontAwesomeIcons.shoppingCart, size: 15),
icon: Icon(Icons.shopping_cart,
size: 18,
color: Colors.blue,),
onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, productID);

Loading…
Cancel
Save