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-update-with-lab-changes
Zohaib Iqbal Kambrani 4 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 BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// const PHARMACY_BASE_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 BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PHARMACY_BASE_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 UPDATE_PRESS_ORDER = 'Services/Patients.svc/REST/PatientER_UpdatePresOrder';
const INSERT_ER_INERT_PRES_ORDER = 'Services/Patients.svc/REST/PatientER_InsertPresOrder'; 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 /// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation'; const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const GET_ALL_TRANSPORTATIONS_RC = '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 BLOOD_DONATION_REGISTER_BLOOD_TYPE = 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = 'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation'; 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 // CMC RC SERVICES
const GET_ALL_CMC_SERVICES_RC = 'rc/api/cmc/getallcmc'; const GET_ALL_CMC_SERVICES_RC = 'rc/api/cmc/getallcmc';
const ADD_CMC_ORDER_RC = 'rc/api/cmc/add'; const ADD_CMC_ORDER_RC = 'rc/api/cmc/add';
const GET_ALL_CMC_ORDERS_RC = 'rc/api/cmc/list'; const GET_ALL_CMC_ORDERS_RC = 'rc/api/cmc/list';
const UPDATE_CMC_ORDER_RC = 'rc/api/cmc/update'; 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 //Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/"; const GET_WISHLIST = "shopping_cart_items/";
const DELETE_WISHLIST = "delete_shopping_cart_item_by_product?customer_id="; const DELETE_WISHLIST = "delete_shopping_cart_item_by_product?customer_id=";

@ -620,7 +620,7 @@ const Map localizedValues = {
"reset": {"en": "Reset", "ar": "اعادة تعيين"}, "reset": {"en": "Reset", "ar": "اعادة تعيين"},
"apply": {"en": "Apply", "ar": "تطبيق"}, "apply": {"en": "Apply", "ar": "تطبيق"},
"viewCategorise": {"en": "View All Categories", "ar": "عرض جميع الفئات"}, "viewCategorise": {"en": "View All Categories", "ar": "عرض جميع الفئات"},
"categorise": {"en": "Categories", "ar": "التطبيقات"}, "categorise": {"en": "Categories", "ar": "الفئات"},
"wishList": {"en": "WishList", "ar": "المفضلة"}, "wishList": {"en": "WishList", "ar": "المفضلة"},
"myAccount": {"en": "My Account", "ar": "حسابي"}, "myAccount": {"en": "My Account", "ar": "حسابي"},
"cart": {"en": "Cart", "ar": "التسوق"}, "cart": {"en": "Cart", "ar": "التسوق"},
@ -1588,4 +1588,19 @@ const Map localizedValues = {
"avgDistance": { "en": "Average Distance", "ar": "متوسط المسافة" }, "avgDistance": { "en": "Average Distance", "ar": "متوسط المسافة" },
"enterDetails": {"en": "Enter Details", "ar": "أدخل التفاصيل"}, "enterDetails": {"en": "Enter Details", "ar": "أدخل التفاصيل"},
"avgHeartRate": { "en": "Average Heart Rate", "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; bool allowCustomerReviews;
int approvedRatingSum; int approvedRatingSum;
int notApprovedRatingSum; int notApprovedRatingSum;
int approvedTotalReviews; dynamic approvedTotalReviews;
int notApprovedTotalReviews; int notApprovedTotalReviews;
dynamic sku; dynamic sku;
bool isRx; bool isRx;

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

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

@ -3,6 +3,7 @@ import 'dart:async';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.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/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart';
@ -17,8 +18,8 @@ import '../base_view_model.dart';
class RRTService extends BaseService {} class RRTService extends BaseService {}
class _RRTServiceData { class _RRTServiceData {
List<PrescriptionsOrder> pendingOrders = []; List<GetCMCAllOrdersResponseModel> pendingOrders = [];
List<PrescriptionsOrder> completedOrders = []; List<GetCMCAllOrdersResponseModel> completedOrders = [];
ServicePrice servicePrice; ServicePrice servicePrice;
} }
@ -34,7 +35,8 @@ class RRTViewModel extends BaseViewModel {
Future<_RRTServiceData> loadRequiredData() async { Future<_RRTServiceData> loadRequiredData() async {
await getServicePrice(); await getServicePrice();
await getAllOrders(); // await getAllOrders();
await getAllOrdersRC();
return rrtServiceData; return rrtServiceData;
} }
@ -79,9 +81,9 @@ class RRTViewModel extends BaseViewModel {
if (json["ServiceID"] == 5) { if (json["ServiceID"] == 5) {
if (json["Status"] == 1 || json["Status"] == 2) { if (json["Status"] == 1 || json["Status"] == 2) {
// Pending // 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; 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 { Future getOrderDetails() async {
return null; return null;
} }
@ -136,6 +158,19 @@ class RRTViewModel extends BaseViewModel {
return Future.value(success); 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 { Future<List<AddressInfo>> getAddresses() async {
Object error; Object error;
try { try {
@ -175,7 +210,6 @@ class RRTViewModel extends BaseViewModel {
await getCustomerAddresses(); await getCustomerAddresses();
} }
// setState(ViewState.Busy); // setState(ViewState.Busy);
// await _pharmacy_service.generatePharmacyToken(); // await _pharmacy_service.generatePharmacyToken();
// if (_customerAddressesService.hasError) { // 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/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -89,28 +90,25 @@ class _AllHabibMedicalSevicePage2State extends State<AllHabibMedicalSevicePage2>
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
AspectRatio( Container(
aspectRatio: 1.9, width: double.infinity,
child: Container( decoration: containerRadiusWithGradient(0,
width: double.infinity, color1: timeCalculator(6, 0, 10, 59)
height: double.infinity, ? Color(0xFFB3E3FE)
decoration: containerRadiusWithGradient(0, : timeCalculator(11, 0, 15, 59)
color1: timeCalculator(6, 0, 10, 59) ? Color(0xFFFF9E7E)
? Color(0xFFB3E3FE) : Color(0xFF2E6686),
: timeCalculator(11, 0, 15, 59) color2: timeCalculator(6, 0, 10, 59)
? Color(0xFFFF9E7E) ? Color(0xFF9AC7FF)
: Color(0xFF2E6686), : timeCalculator(11, 0, 15, 59)
color2: timeCalculator(6, 0, 10, 59) ? Color(0xFFFECB50)
? Color(0xFF9AC7FF) : Color(0xFF122F48)),
: timeCalculator(11, 0, 15, 59) child: Padding(
? Color(0xFFFECB50) padding: const EdgeInsets.all(20.0),
: Color(0xFF122F48)), child: Row(
child: Padding( children: [
padding: const EdgeInsets.all(20.0), Expanded(
child: Stack( child: Column(
alignment: projectViewModel.isArabic ? Alignment.centerLeft : Alignment.centerRight,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Directionality( Directionality(
@ -134,7 +132,6 @@ class _AllHabibMedicalSevicePage2State extends State<AllHabibMedicalSevicePage2>
color: Colors.white, color: Colors.white,
), ),
), ),
mFlex(0),
Text( Text(
TranslationBase.of(context).healthWeatherIndicators, TranslationBase.of(context).healthWeatherIndicators,
style: TextStyle( style: TextStyle(
@ -153,31 +150,34 @@ class _AllHabibMedicalSevicePage2State extends State<AllHabibMedicalSevicePage2>
color: Colors.white, 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", Column(
color: Colors.white.withOpacity(0.5), 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:diplomaticquarterapp/widgets/weather_slider/weather_slider.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class HealthWeatherIndicator extends StatefulWidget { class HealthWeatherIndicator extends StatefulWidget {
@ -49,28 +50,25 @@ class _HospitalsPageState extends State<HealthWeatherIndicator> {
body: mode.weatherIndicatorData.length > 0 body: mode.weatherIndicatorData.length > 0
? SingleChildScrollView( ? SingleChildScrollView(
child: Column(children: [ child: Column(children: [
AspectRatio( Container(
aspectRatio: 2.3, width: double.infinity,
child: Container( decoration: containerRadiusWithGradient(0,
width: double.infinity, color1: timeCalculator(6, 0, 10, 59)
height: double.infinity, ? Color(0xFFB3E3FE)
decoration: containerRadiusWithGradient(0, : timeCalculator(11, 0, 15, 59)
color1: timeCalculator(6, 0, 10, 59) ? Color(0xFFFF9E7E)
? Color(0xFFB3E3FE) : Color(0xFF2E6686),
: timeCalculator(11, 0, 15, 59) color2: timeCalculator(6, 0, 10, 59)
? Color(0xFFFF9E7E) ? Color(0xFF9AC7FF)
: Color(0xFF2E6686), : timeCalculator(11, 0, 15, 59)
color2: timeCalculator(6, 0, 10, 59) ? Color(0xFFFECB50)
? Color(0xFF9AC7FF) : Color(0xFF122F48)),
: timeCalculator(11, 0, 15, 59) child: Padding(
? Color(0xFFFECB50) padding: const EdgeInsets.all(20.0),
: Color(0xFF122F48)), child: Row(
child: Padding( children: [
padding: const EdgeInsets.all(20.0), Expanded(
child: Stack( child: Column(
alignment: projectViewModel.isArabic ? Alignment.centerLeft : Alignment.centerRight,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Directionality( Directionality(
@ -94,7 +92,6 @@ class _HospitalsPageState extends State<HealthWeatherIndicator> {
color: Colors.white, color: Colors.white,
), ),
), ),
mFlex(0),
Text( Text(
TranslationBase.of(context).healthWeatherIndicators, TranslationBase.of(context).healthWeatherIndicators,
style: TextStyle( style: TextStyle(
@ -115,12 +112,11 @@ class _HospitalsPageState extends State<HealthWeatherIndicator> {
), ),
], ],
), ),
Image.asset( ),
"assets/images/Weather_ico.png", SvgPicture.asset(
color: Colors.white.withOpacity(0.5), "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/create_new_user_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_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/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/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/active_medications/DayCheckBoxDialog.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/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -72,11 +69,11 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<AddNewChildViewModel>( return BaseView<AddNewChildViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).vaccination, appBarTitle: TranslationBase.of(context).vaccination,
showNewAppBarTitle: true,
showNewAppBar: true, showNewAppBar: true,
body: Container( body: Container(
child: Column( child: Column(
@ -253,12 +250,9 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
color: Colors.white, color: Colors.white,
child: SecondaryButton( child: DefaultButton(
textColor: Colors.white, TranslationBase.of(context).add,
color: checkedValue == false ? Colors.white24 : CustomColors.accentColor, () async {
label: TranslationBase.of(context).add,
//
onTap: () async {
newChild.babyName = _firstTextController.text + " " + _secondTextController.text; newChild.babyName = _firstTextController.text + " " + _secondTextController.text;
newChild.gender = checkedValue.toString(); newChild.gender = checkedValue.toString();
newChild.strDOB = getStartDay(); newChild.strDOB = getStartDay();

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

@ -1,13 +1,11 @@
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart'; 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/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -56,7 +54,7 @@ class _ChildPageState extends State<ChildVaccinePage> with SingleTickerProviderS
); );
}, },
child: Container( 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( decoration: BoxDecoration(
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(12)), borderRadius: BorderRadius.all(Radius.circular(12)),
@ -111,7 +109,7 @@ class _ChildPageState extends State<ChildVaccinePage> with SingleTickerProviderS
color: selectedColor, color: selectedColor,
), ),
), ),
Text(DateUtil.yearMonthDay(model.babyInformationModelList[index].dOB), Text(" " + DateUtil.getDayMonthYearDateFormatted(model.babyInformationModelList[index].dOB),
style: TextStyle( style: TextStyle(
fontSize: 11, fontSize: 11,
color: selectedColor, color: selectedColor,
@ -137,7 +135,7 @@ class _ChildPageState extends State<ChildVaccinePage> with SingleTickerProviderS
} }
}, },
child: Container( 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), padding: EdgeInsets.only(left: 12, right: 12, top: 8, bottom: 8),
child: Row( child: Row(
children: [ children: [
@ -175,19 +173,9 @@ class _ChildPageState extends State<ChildVaccinePage> with SingleTickerProviderS
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
color: Colors.white, color: Colors.white,
child: SecondaryButton( child: DefaultButton(
textColor: Colors.white, TranslationBase.of(context).addNewChild,
color: checkedValue () {
? CustomColors.accentColor
: Color.fromRGBO(
63,
72,
74,
1,
),
label: TranslationBase.of(context).addNewChild,
//
onTap: () {
Navigator.push( Navigator.push(
context, context,
FadePage( 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/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-order-list-item.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'; import 'package:diplomaticquarterapp/uitl/utils.dart';
class RRTLogPage extends StatefulWidget { class RRTLogPage extends StatefulWidget {
final List<PrescriptionsOrder> orders; final List<GetCMCAllOrdersResponseModel> orders;
const RRTLogPage({this.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); GifLoaderDialogUtils.showMyDialog(context);
var success = await viewModel.cancelOrder(order); var success = await viewModel.cancelOrderRC(order);
if (success) { if (success) {
viewModel.setState(ViewState.Busy); viewModel.setState(ViewState.Busy);
await viewModel.getAllOrders(); await viewModel.getAllOrdersRC();
viewModel.setState(ViewState.Idle); viewModel.setState(ViewState.Idle);
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen));
Navigator.push(context, FadePage(page: RRTMainScreen())); Navigator.push(context, FadePage(page: RRTMainScreen()));

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.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-logs-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.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:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class RRTMainScreen extends StatefulWidget { class RRTMainScreen extends StatefulWidget {
final index = 0; final index = 0;
RRTMainScreen({index}); RRTMainScreen({index});
@override @override
State<StatefulWidget> createState() => RRTMainScreenState(); State<StatefulWidget> createState() => RRTMainScreenState();
} }
@ -25,6 +29,8 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderS
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -36,6 +42,7 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderS
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
localize = TranslationBase.of(context); localize = TranslationBase.of(context);
return AppScaffold( return AppScaffold(
@ -80,20 +87,40 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderS
margin: EdgeInsets.all(0.0), margin: EdgeInsets.all(0.0),
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)), 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: [ child: TabBar(
Tab( onTap: onPageChanged,
child: Text( controller: tabController,
localize.rapidResponseTeam, indicatorWeight: 3.0,
style: TextStyle(color: Theme.of(context).appBarTheme.color), 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,
), ),
), unselectedLabelStyle: TextStyle(
Tab( fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
child: Text( fontSize: 15,
localize.orderLog, fontWeight: FontWeight.w600,
style: TextStyle(color: Theme.of(context).appBarTheme.color), 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( 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/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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)); final _item_content_seperator = Container(height: 0.25, padding: EdgeInsets.all(10), color: Colors.grey.withOpacity(0.5));
class RRTLogListItem extends StatefulWidget { class RRTLogListItem extends StatefulWidget {
final PrescriptionsOrder order; final GetCMCAllOrdersResponseModel order;
final Function(PrescriptionsOrder) onCancel; final Function(GetCMCAllOrdersResponseModel) onCancel;
RRTLogListItem(this.order, {this.onCancel}); RRTLogListItem(this.order, {this.onCancel});
@override @override
@ -34,8 +35,8 @@ class RRTLogListItemState extends State<RRTLogListItem> {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
localize = TranslationBase.of(context); localize = TranslationBase.of(context);
int status = widget.order.status; int status = widget.order.statusId;
String _statusDisp = projectViewModel.isArabic ? widget.order.descriptionN : widget.order.description; String _statusDisp = widget.order.statusText;
Color _color; Color _color;
if (status == 1) { if (status == 1) {
//pending //pending
@ -46,7 +47,7 @@ class RRTLogListItemState extends State<RRTLogListItem> {
} else if (status == 3) { } else if (status == 3) {
//completed //completed
_color = Color(0xff359846); _color = Color(0xff359846);
} else if (status == 4) { } else if (status == 4 || status == 6 || status == 7) {
//cancel // Rejected //cancel // Rejected
_color = Color(0xffD02127); _color = Color(0xffD02127);
} }
@ -111,7 +112,7 @@ class RRTLogListItemState extends State<RRTLogListItem> {
), ),
Expanded( Expanded(
child: Text( 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), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56),
), ),
), ),
@ -126,7 +127,7 @@ class RRTLogListItemState extends State<RRTLogListItem> {
), ),
Expanded( Expanded(
child: Text( 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), 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, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text( 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), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
), ),
SizedBox(height: 12), SizedBox(height: 12),
if (widget.order.status == 1 || widget.order.status == 2) if (widget.order.statusId == 1 || widget.order.statusId == 2)
InkWell( InkWell(
onTap: () { onTap: () {
//onCancel(order); //onCancel(order);
@ -227,11 +228,11 @@ class RRTLogListItemState extends State<RRTLogListItem> {
// ); // );
cancelOrders(order) async { cancelOrders(order) async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
var success = await viewModel.cancelOrder(order); var success = await viewModel.cancelOrderRC(order);
if (success) { if (success) {
viewModel.setState(ViewState.Busy); viewModel.setState(ViewState.Busy);
await viewModel.getAllOrders(); await viewModel.getAllOrdersRC();
viewModel.setState(ViewState.Idle); viewModel.setState(ViewState.Idle);
Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen));
Navigator.push(context, FadePage(page: RRTMainScreen())); Navigator.push(context, FadePage(page: RRTMainScreen()));

@ -217,7 +217,7 @@ class RRTPlaceOrderPage extends StatelessWidget {
gotoRRTRoot() async { gotoRRTRoot() async {
viewModel.setState(ViewState.Busy); viewModel.setState(ViewState.Busy);
await viewModel.getAllOrders(); await viewModel.getAllOrdersRC();
viewModel.setState(ViewState.Idle); viewModel.setState(ViewState.Idle);
Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: RRTMainScreen));
Navigator.push(_context, FadePage(page: 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/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; import 'package:diplomaticquarterapp/models/rrt/service_price.dart';
@ -15,7 +16,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class RRTRequestPage extends StatefulWidget { class RRTRequestPage extends StatefulWidget {
final List<PrescriptionsOrder> pendingOrders; final List<GetCMCAllOrdersResponseModel> pendingOrders;
final ServicePrice servicePrice; final ServicePrice servicePrice;
RRTRequestPage({this.pendingOrders, this.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); GifLoaderDialogUtils.showMyDialog(context);
var success = await viewModel.cancelOrder(order); var success = await viewModel.cancelOrderRC(order);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (success) if (success)
setState(() { setState(() {
widget.pendingOrders.remove(order); widget.pendingOrders.remove(order);
}); });
await viewModel.getAllOrders(); await viewModel.getAllOrdersRC();
} }
} }

@ -621,19 +621,18 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
size: 18, size: 18,
color: Colors.blue,), color: Colors.blue,),
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.finalProducts[index].rxMessage == null){ if(model.finalProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.finalProducts[index].id); await addToCartFunction(1, model.finalProducts[index].id);
// GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
Navigator.push( Navigator.push(
context, context,
FadePage(page: CartOrderPage()), FadePage(page: CartOrderPage()));
);
} }
else{ else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); 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_details.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
import 'package:diplomaticquarterapp/theme/colors.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/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.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)), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)),
), ),
Text( Text(
convertDateFormat( DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(model.insurance[index].cardValidTo)),
model.insurance[index].cardValidTo,
),
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xFF575757)), 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/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.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/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.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( child: Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(top: 12.0),
child: Container( child: Container(
decoration: cardRadius(12), decoration: cardRadius(12),
child: Padding( child: Padding(

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

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

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

@ -89,7 +89,7 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
), ),
tabs: [ tabs: [
Tab(text: TranslationBase.of(context).weekly), Tab(text: TranslationBase.of(context).weekly),
Tab(text: TranslationBase.of(context).monthly), Tab(text: TranslationBase.of(context).monthlyTab),
Tab(text: TranslationBase.of(context).yearly), Tab(text: TranslationBase.of(context).yearly),
], ],
onTap: (value) { onTap: (value) {
@ -262,6 +262,7 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
timeSeries: weeklyTimeSeriesData, timeSeries: weeklyTimeSeriesData,
indexes: weeklyTimeSeriesData.length ~/ 5.5, indexes: weeklyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8, horizontalInterval: 8,
isWeeklyOrMonthly: true,
), ),
), ),
Container( Container(
@ -337,6 +338,7 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
timeSeries: monthlyTimeSeriesData, timeSeries: monthlyTimeSeriesData,
indexes: monthlyTimeSeriesData.length ~/ 5.5, indexes: monthlyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8, horizontalInterval: 8,
isWeeklyOrMonthly: true,
), ),
), ),
Container( 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/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.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/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -30,118 +31,35 @@ class _HealthDataListState extends State<HealthDataList> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
List<Widget> myMedicalList = myOptionsList(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).smartWatches, appBarTitle: TranslationBase.of(context).smartWatches,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
body: Container( body: Container(
height: MediaQuery.of(context).size.height,
margin: EdgeInsets.all(20.0),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
InkWell( Container(
onTap: () { width: double.infinity,
Navigator.push( height: 20,
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)),
),
],
), ),
Divider( Padding(
color: Colors.grey[500], padding: EdgeInsets.only(left: 12, right: 12),
), child: GridView.builder(
InkWell( shrinkWrap: true,
onTap: () { primary: false,
Navigator.push( physics: NeverScrollableScrollPhysics(),
context, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
FadePage( padding: EdgeInsets.zero,
page: StepsTracker(), itemCount: myMedicalList.length,
), itemBuilder: (BuildContext context, int index) {
); return myMedicalList[index];
}, },
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)),
),
],
), ),
), ),
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 { // void readLast() async {
// print("ReadLast"); // print("ReadLast");
// final result = await FitKit.readLast(DataType.DISTANCE); // final result = await FitKit.readLast(DataType.DISTANCE);

@ -89,7 +89,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
), ),
tabs: [ tabs: [
Tab(text: TranslationBase.of(context).weekly), Tab(text: TranslationBase.of(context).weekly),
Tab(text: TranslationBase.of(context).monthly), Tab(text: TranslationBase.of(context).monthlyTab),
Tab(text: TranslationBase.of(context).yearly), Tab(text: TranslationBase.of(context).yearly),
], ],
onTap: (value) { onTap: (value) {
@ -99,7 +99,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
} else if (value == 1) { } else if (value == 1) {
getMonthlyHeartRateData(); getMonthlyHeartRateData();
} else { } else {
// getYearlyHeartRateData(); getYearlyHeartRateData();
} }
}, },
), ),
@ -109,11 +109,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
children: [ children: [
isWeeklyDataLoaded ? getWeeklyHeartRateDetails() : Container(), isWeeklyDataLoaded ? getWeeklyHeartRateDetails() : Container(),
isMonthlyDataLoaded ? getMonthlyHeartRateDetails() : Container(), isMonthlyDataLoaded ? getMonthlyHeartRateDetails() : Container(),
// isYearlyDataLoaded ? getYearlyDistanceDetails() : Container() isYearlyDataLoaded ? getYearlyHeartRateDetails() : Container()
// Container(),
// Container(),
Container()
], ],
controller: _tabController, controller: _tabController,
), ),
@ -183,13 +179,13 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
yearlyDataLength = 0; yearlyDataLength = 0;
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getPatientHealthDataStats(7, 3, context).then((res) { service.getPatientHealthDataStats(3, 3, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
yearlyHearRateList.clear(); yearlyHearRateList.clear();
res['Med_GetYearTransactionsStsList'].forEach((element) { res['Med_GetYearTransactionsStsList'].forEach((element) {
yearlyHearRateList.add(new YearlyHeartRateResModel.fromJson(element)); yearlyHearRateList.add(new YearlyHeartRateResModel.fromJson(element));
if (element['ValueSum'] != null) { if (element['ValueAvg'] != null) {
num value = element['ValueSum']; num value = element['ValueAvg'];
avgYearlyHearRateValue += value; avgYearlyHearRateValue += value;
yearlyDataLength++; yearlyDataLength++;
} }
@ -264,6 +260,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
timeSeries: weeklyTimeSeriesData, timeSeries: weeklyTimeSeriesData,
indexes: weeklyTimeSeriesData.length ~/ 5.5, indexes: weeklyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8, horizontalInterval: 8,
isWeeklyOrMonthly: true,
), ),
), ),
Container( Container(
@ -339,6 +336,7 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
timeSeries: monthlyTimeSeriesData, timeSeries: monthlyTimeSeriesData,
indexes: monthlyTimeSeriesData.length ~/ 5.5, indexes: monthlyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8, horizontalInterval: 8,
isWeeklyOrMonthly: true,
), ),
), ),
Container( Container(
@ -424,11 +422,11 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
children: [ children: [
Container( Container(
padding: EdgeInsets.fromLTRB(30.0, 15.0, 30.0, 5.0), 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( Container(
margin: EdgeInsets.only(bottom: 10.0), 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/locator.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.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/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -24,13 +27,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
bool hasAlreadySynced = false; bool hasAlreadySynced = false;
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
if(authenticatedUserObject.isLogin) getLastPatientRecord(context); if (authenticatedUserObject.isLogin) getLastPatientRecord(context);
}); });
super.initState(); 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') 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( body: Container(
child: Platform.isIOS child: Platform.isIOS ? _getAppleWatchInstructions() : _getGoogleWatchInstructions(),
? _getAppleWatchInstructions()
: _getGoogleWatchInstructions(),
)); ));
} }
@ -65,10 +65,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
// margin: EdgeInsets.only(top: 10.0), // margin: EdgeInsets.only(top: 10.0),
child: CarouselSlider( child: CarouselSlider(
carouselController: buttonCarouselController, carouselController: buttonCarouselController,
options: CarouselOptions( options: CarouselOptions(enableInfiniteScroll: false, viewportFraction: 0.95, height: MediaQuery.of(context).size.height * 0.65),
enableInfiniteScroll: false,
viewportFraction: 0.95,
height: MediaQuery.of(context).size.height * 0.9),
items: [1, 2].map((i) { items: [1, 2].map((i) {
return Builder( return Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
@ -83,33 +80,24 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
child: i == 1 child: i == 1
? Column( ? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text("Supported Smartwatches", child: Text(TranslationBase.of(context).supportedWatches, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold)),
), ),
Container( Container(
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 10.0),
EdgeInsets.only(top: 10.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/apple-watch-1.jpeg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/apple-watch-1.jpeg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text( child: Text("Apple Watch Series 1", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
"Apple Watch Series 1", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -117,20 +105,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 10.0),
EdgeInsets.only(top: 10.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/apple-watch-2.jpg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/apple-watch-2.jpg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text( child: Text("Apple Watch Series 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
"Apple Watch Series 2", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -145,20 +126,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/apple-watch-3.jpg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/apple-watch-3.jpg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text( child: Text("Apple Watch Series 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
"Apple Watch Series 3", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -166,20 +140,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/apple-watch-4.jpg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/apple-watch-4.jpg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text( child: Text("Apple Watch Series 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
"Apple Watch Series 4", overflow: TextOverflow.clip ,
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -194,20 +161,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/apple-watch-5.jpg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/apple-watch-5.jpg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text( child: Text("Apple Watch Series 5", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
"Apple Watch Series 5", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -215,20 +175,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/Apple-Watch-6.png", width: 70.0, height: 70.0),
"assets/images/SmartWatches/Apple-Watch-6.png",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text( child: Text("Apple Watch Series 6", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
"Apple Watch Series 6", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -243,19 +196,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/miBand3.jpg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 3", overflow: TextOverflow.clip, child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -263,19 +210,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/miBand4.jpg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 4", overflow: TextOverflow.clip, child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -285,143 +226,78 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB( margin: EdgeInsets.fromLTRB(10.0, 30.0, 10.0, 10.0),
10.0, 30.0, 10.0, 10.0), child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
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)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).syncInstructionsIntro2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
"Before syncing data, please make sure that you have followed the instructions properly",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(15.0), margin: EdgeInsets.fromLTRB(15.0, 40.0, 15.0, 0.0),
child: ButtonTheme( child: DefaultButton(
shape: RoundedRectangleBorder( TranslationBase.of(context).continues,
borderRadius: () {
BorderRadius.circular(10.0), buttonCarouselController.nextPage();
), },
minWidth: color: Color(0xff359846),
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)),
),
), ),
), ),
], ],
) )
: Column( : Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Text("Watch Instructions:", child: Text(TranslationBase.of(context).watchInstructions, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "WorkSans")),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Text( child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
"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)),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB( margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
10.0, 20.0, 10.0, 10.0), child: Text(TranslationBase.of(context).syncInstructionsIntro3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
child: Text(
"Before syncing data, please make sure that following instructions are met: ",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB( margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
10.0, 20.0, 10.0, 10.0), child: Text(TranslationBase.of(context).iosInstructions1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
child: Text(
"1. Make sure that you have installed 'Health' App & 'Watch' App from Apple Store.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Text( child: Text(TranslationBase.of(context).iosInstructions2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
"2. Make sure that your Apple Watch is connected with the Watch & Health Apps.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Text( child: Text(TranslationBase.of(context).iosInstructions3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
"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)),
), ),
Container( Padding(
margin: EdgeInsets.fromLTRB( padding: const EdgeInsets.fromLTRB(12.0, 50.0, 12.0, 20.0),
15.0, 80.0, 15.0, 15.0), child: Row(
child: ButtonTheme( children: [
shape: RoundedRectangleBorder( Expanded(
borderRadius: child: DefaultButton(
BorderRadius.circular(10.0), TranslationBase.of(context).syncHealthData,
), () {},
minWidth: color: Color(0xFFD02127),
MediaQuery.of(context).size.width, disabledColor: Color(0xff28323A).withOpacity(0.3),
height: 45.0, ),
child: RaisedButton( ),
color: new Color(0xFF60686b), mWidth(12),
textColor: Colors.white, if (hasAlreadySynced)
elevation: 0, Expanded(
disabledTextColor: Colors.white, child: DefaultButton(
disabledColor: new Color(0xFFbcc2c4), TranslationBase.of(context).alreadySynced,
onPressed: () { () {
buttonCarouselController.nextPage(); _openHealthDataList();
}, },
child: Text("SYNC HEALTH DATA", color: Color(0xff359846),
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(),
], ],
), ),
)); ));
@ -447,7 +323,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
options: CarouselOptions( options: CarouselOptions(
// enableInfiniteScroll: true, // enableInfiniteScroll: true,
viewportFraction: 0.99, viewportFraction: 0.99,
height: MediaQuery.of(context).size.height*1.02 ), height: MediaQuery.of(context).size.height * 0.9),
items: [1, 2].map((i) { items: [1, 2].map((i) {
return Builder( return Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
@ -455,7 +331,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
margin: EdgeInsets.symmetric(horizontal: 5.0), margin: EdgeInsets.symmetric(horizontal: 5.0),
child: Card( 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), // fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white.withOpacity(1.0), color: Colors.white.withOpacity(1.0),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
@ -463,34 +339,24 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
child: i == 1 child: i == 1
? Column( ? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text("Supported Smartwatches", child: Text(TranslationBase.of(context).supportedWatches, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "WorkSans")),
), ),
Container( Container(
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 10.0),
EdgeInsets.only(top: 10.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/huawei-watch-2.png", width: 70.0, height: 70.0),
"assets/images/SmartWatches/huawei-watch-2.png",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text( child: Text("Huawei Watch 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
"Huawei Watch 2", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -498,21 +364,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 10.0),
EdgeInsets.only(top: 10.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0),
"assets/images/SmartWatches/ticwatche2.png",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text( child: Text("Mobovi TicWatch E2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
"Mobovi TicWatch E2",
overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -527,19 +385,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/huawei-watch-2-classic.png", width: 70.0, height: 70.0),
"assets/images/SmartWatches/huawei-watch-2-classic.png",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text("Huawei Watch", overflow: TextOverflow.clip, child: Text("Huawei Watch", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -547,19 +399,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0),
"assets/images/SmartWatches/ticwatche2.png",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text("Fossil Sport", overflow: TextOverflow.clip, child: Text("Fossil Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -574,20 +420,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/misfit-vapor-2.jpg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/misfit-vapor-2.jpg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text( child: Text("MisFit Vapor 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
"MisFit Vapor 2", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -595,20 +434,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/lg-watch-sport.jpg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/lg-watch-sport.jpg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text( child: Text("LG Watch Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
"LG Watch Sport", overflow: TextOverflow.clip,
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -623,19 +455,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [ children: [
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/miBand3.jpg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 3", overflow: TextOverflow.clip, child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -643,19 +469,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
Expanded( Expanded(
child: Container( child: Container(
margin: margin: EdgeInsets.only(top: 15.0),
EdgeInsets.only(top: 15.0),
child: Row( child: Row(
children: [ children: [
Image.asset( Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0),
"assets/images/SmartWatches/miBand4.jpg",
width: 70.0,
height: 70.0),
Container( Container(
width: MediaQuery.of(context).size.width*0.22, width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 4", overflow: TextOverflow.clip, child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
style: TextStyle(
fontSize: 12.0)),
) )
], ],
), ),
@ -666,162 +486,135 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
launch( launch("https://wearos.google.com/#find-your-watch");
"https://wearos.google.com/#find-your-watch");
}, },
child: Container( child: Container(
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0, left: 15.0, right: 15.0),
child: Text( child: Text(TranslationBase.of(context).moreSupportedWatches,
"More Supported Smartwatches...", textAlign: TextAlign.center, style: TextStyle(fontSize: 14.0, color: Colors.blue, decoration: TextDecoration.underline, letterSpacing: -0.36)),
style: TextStyle(
fontSize: 17.0,
color: Colors.blue,
decoration:
TextDecoration.underline)),
), ),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
"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)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).syncInstructionsIntro2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
"Before syncing data, please make sure that you have followed the instructions properly",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(15.0), margin: EdgeInsets.all(15.0),
child: ButtonTheme( child: DefaultButton(
shape: RoundedRectangleBorder( TranslationBase.of(context).continues,
borderRadius: () {
BorderRadius.circular(10.0), buttonCarouselController.nextPage();
), },
minWidth: color: CustomColors.green,
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)),
),
), ),
), ),
], ],
) )
: Column( : Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text("Watch Instructions:", child: Text(TranslationBase.of(context).watchInstructions, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
style: TextStyle(
fontSize: 22.0,
fontWeight: FontWeight.bold,
fontFamily: "WorkSans")),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
"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)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).syncInstructionsIntro3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
"Before syncing data, please make sure that following instructions are met: ",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).androidInstructions1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
"1. Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).androidInstructions2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
"2. Make sure that you have installed your watch related apps from Google PlayStore.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).androidInstructions3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
"3. Make sure that your Smart Watch is connected with the WearOS app & your watch apps.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).androidInstructions4, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
"4. Make sure that your smart watch apps are linked/associated with Google Fit App.",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Padding(
margin: EdgeInsets.fromLTRB( padding: const EdgeInsets.fromLTRB(12.0, 50.0, 12.0, 20.0),
15.0, 75.0, 15.0, 15.0), child: Row(
child: ButtonTheme( children: [
shape: RoundedRectangleBorder( Expanded(
borderRadius: child: DefaultButton(
BorderRadius.circular(10.0), TranslationBase.of(context).syncHealthData,
), () {},
minWidth: color: Color(0xFFD02127),
MediaQuery.of(context).size.width, disabledColor: Color(0xff28323A).withOpacity(0.3),
height: 45.0, ),
child: RaisedButton( ),
color: new Color(0xFF60686b), mWidth(12),
textColor: Colors.white, if (hasAlreadySynced)
elevation: 0, Expanded(
disabledTextColor: Colors.white, child: DefaultButton(
disabledColor: new Color(0xFFbcc2c4), TranslationBase.of(context).alreadySynced,
onPressed: () { () {
buttonCarouselController.nextPage(); _openHealthDataList();
}, },
child: Text("SYNC HEALTH DATA", color: Color(0xff359846),
style: TextStyle(fontSize: 18.0)), ),
), ),
],
), ),
), ),
hasAlreadySynced ? Container( // Container(
margin: EdgeInsets.fromLTRB( // margin: EdgeInsets.fromLTRB(15.0, 75.0, 15.0, 15.0),
15.0, 0.0, 15.0, 15.0), // child: ButtonTheme(
child: ButtonTheme( // shape: RoundedRectangleBorder(
shape: RoundedRectangleBorder( // borderRadius: BorderRadius.circular(10.0),
borderRadius: // ),
BorderRadius.circular(10.0), // minWidth: MediaQuery.of(context).size.width,
), // height: 45.0,
minWidth: // child: RaisedButton(
MediaQuery.of(context).size.width, // color: new Color(0xFF60686b),
height: 45.0, // textColor: Colors.white,
child: RaisedButton( // elevation: 0,
color: new Color(0xFF60686b), // disabledTextColor: Colors.white,
textColor: Colors.white, // disabledColor: new Color(0xFFbcc2c4),
elevation: 0, // onPressed: () {
disabledTextColor: Colors.white, // buttonCarouselController.nextPage();
disabledColor: new Color(0xFFbcc2c4), // },
onPressed: () { // child: Text("SYNC HEALTH DATA", style: TextStyle(fontSize: 18.0)),
_openHealthDataList(); // ),
}, // ),
child: Text("ALREADY SYNCED", // ),
style: TextStyle(fontSize: 18.0)), // hasAlreadySynced
), // ? Container(
), // margin: EdgeInsets.fromLTRB(15.0, 0.0, 15.0, 15.0),
) : Container(), // 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: [ tabs: [
Tab(text: TranslationBase.of(context).weekly), Tab(text: TranslationBase.of(context).weekly),
Tab(text: TranslationBase.of(context).monthly), Tab(text: TranslationBase.of(context).monthlyTab),
Tab(text: TranslationBase.of(context).yearly), Tab(text: TranslationBase.of(context).yearly),
], ],
onTap: (value) { onTap: (value) {
@ -258,6 +258,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
timeSeries: weeklyTimeSeriesData, timeSeries: weeklyTimeSeriesData,
indexes: weeklyTimeSeriesData.length ~/ 5.5, indexes: weeklyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8, horizontalInterval: 8,
isWeeklyOrMonthly: true,
), ),
), ),
Container( Container(
@ -333,6 +334,7 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
timeSeries: monthlyTimeSeriesData, timeSeries: monthlyTimeSeriesData,
indexes: monthlyTimeSeriesData.length ~/ 5.5, indexes: monthlyTimeSeriesData.length ~/ 5.5,
horizontalInterval: 8, horizontalInterval: 8,
isWeeklyOrMonthly: true,
), ),
), ),
Container( Container(

@ -1175,18 +1175,18 @@ class _ParentCategorisePageState extends State<ParentCategorisePage> {
size: 18, size: 18,
color: Colors.blue,), color: Colors.blue,),
onPressed: () async { onPressed: () async {
GifLoaderDialogUtils.showMyDialog(context);
if(model.parentProducts[index].rxMessage == null){ if(model.parentProducts[index].rxMessage == null){
GifLoaderDialogUtils.showMyDialog(context);
await addToCartFunction(1, model.parentProducts[index].id); await addToCartFunction(1, model.parentProducts[index].id);
GifLoaderDialogUtils.hideDialog(context);
Navigator.push( Navigator.push(
context, context,
FadePage(page: CartOrderPage()), FadePage(page: CartOrderPage()));
);
} }
else{ else{
AppToast.showErrorToast(message: TranslationBase.of(context).needPrescription); 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, : widget.model.wishListList[index].product.name,
productPrice: widget.model.wishListList[index].subtotal, productPrice: widget.model.wishListList[index].subtotal,
productRate: double.parse(widget.model.wishListList[index].subtotalVatRate), productRate: double.parse(widget.model.wishListList[index].subtotalVatRate),
approvedTotalReviews:widget.model.wishListList[index].product.approvedTotalReviews,
productImage: widget.model.wishListList[index].product.images[0].src, productImage: widget.model.wishListList[index].product.images[0].src,
productID: widget.model.wishListList[index].product.id, productID: widget.model.wishListList[index].product.id,
onDelete: deleteWishListItem, onDelete: deleteWishListItem,

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

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

@ -20,6 +20,7 @@ class FooterWidget extends StatefulWidget {
final int quantityLimit; final int quantityLimit;
final PharmacyProduct item; final PharmacyProduct item;
final Function addToCartFunction; final Function addToCartFunction;
final Function addToShoppingCartFunction;
final ProductDetailViewModel model; final ProductDetailViewModel model;
int quantity; int quantity;
@ -30,6 +31,7 @@ class FooterWidget extends StatefulWidget {
{this.quantity, {this.quantity,
this.isOverQuantity = false, this.isOverQuantity = false,
this.addToCartFunction, this.addToCartFunction,
this.addToShoppingCartFunction,
this.model}); this.model});
@override @override
@ -217,7 +219,7 @@ class _FooterWidgetState extends State<FooterWidget> {
widget.quantity > widget.quantityLimit || widget.quantity > widget.quantityLimit ||
widget.item.rxMessage != null, widget.item.rxMessage != null,
onTap: () async { onTap: () async {
await widget.addToCartFunction( await widget.addToShoppingCartFunction(
quantity: widget.quantity, quantity: widget.quantity,
itemID: widget.item.id, itemID: widget.item.id,
model: widget.model); 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/core/viewModels/pharmacyModule/product_detail_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/compare-list.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/product-name-and-price.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/recommended_products.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/recommended_products.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/reviews_info.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.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/material.dart';
import 'availability_info.dart'; import 'availability_info.dart';
@ -331,6 +333,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
quantity: quantity, quantity: quantity,
isOverQuantity: isOverQuantity, isOverQuantity: isOverQuantity,
addToCartFunction: addToCartFunction, addToCartFunction: addToCartFunction,
addToShoppingCartFunction: addToShoppingCartFunction,
model: model, model: model,
), ),
)); ));
@ -355,6 +358,18 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
await model.addToCartData(quantity, itemID); await model.addToCartData(quantity, itemID);
GifLoaderDialogUtils.hideDialog(context); 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 bool isInWishList;
final Function addToCartFunction; final Function addToCartFunction;
ProductAppBar({Key key, this.product, this.model, this.addToWishlistFunction, this.quantity, this.deleteFromWishlistFunction, this.isInWishList, this.addToCartFunction}) : super(key: key);
ProductAppBar( AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
{Key key,
this.product,
this.model,
this.addToWishlistFunction,
this.quantity,
this.deleteFromWishlistFunction,
this.isInWishList, this.addToCartFunction})
: super(key: key);
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -75,25 +65,29 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
onPress: () { onPress: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(builder: (context) => CartOrderPage()),
builder: (context) => CartOrderPage()),
); );
}), }),
if (Provider.of<OrderPreviewViewModel>(context, listen: false).cartResponse.quantityCount != 0)
if(Provider.of<OrderPreviewViewModel>(context, listen: false).cartResponse.quantityCount !=0) Positioned(
Positioned( top: 0,
top:0, right: -1.0, right: -1.0,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.red[800], color: Colors.red[800],
borderRadius: BorderRadius.circular(15), 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( SizedBox(
@ -135,16 +129,12 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
onTap: () async { onTap: () async {
if (quantity > 0) { if (quantity > 0) {
{ {
await addToCartFunction( await addToCartFunction(quantity: quantity, itemID: itemID, model: model);
quantity: quantity,
itemID: itemID,
model: model);
Navigator.of(context).pop(); Navigator.of(context).pop();
} }
} else { } else {
AppToast.showErrorToast( AppToast.showErrorToast(message: "you should add quantity");
message: "you should add quantity");
} }
}), }),
ListTile( ListTile(
@ -153,9 +143,7 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
color: !isInWishList ? Colors.white : Colors.red[800], color: !isInWishList ? Colors.white : Colors.red[800],
), ),
title: Text( title: Text(
isInWishList isInWishList ? TranslationBase.of(context).removeFromWishlist : TranslationBase.of(context).addToWishlist,
? TranslationBase.of(context).removeFromWishlist
: TranslationBase.of(context).addToWishlist,
), ),
onTap: () async { onTap: () async {
if (isInWishList) if (isInWishList)
@ -170,8 +158,7 @@ class ProductAppBar extends StatelessWidget with PreferredSizeWidget {
TranslationBase.of(context).compare, TranslationBase.of(context).compare,
), ),
onTap: () { onTap: () {
Provider.of<CompareList>(context, listen: false) Provider.of<CompareList>(context, listen: false).addItem(specificationData);
.addItem(specificationData);
Navigator.of(context).pop(); 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:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class ProductOrderItem extends StatefulWidget { class ProductOrderItem extends StatefulWidget {
@ -39,7 +40,7 @@ class _ProductOrderItemState extends State<ProductOrderItem> {
leading: InkWell( leading: InkWell(
onTap: () => {widget.deleteCartItems()}, onTap: () => {widget.deleteCartItems()},
child: Icon( child: Icon(
Icons.delete_outline_sharp, FontAwesomeIcons.trashAlt,size: 15,
color: Colors.grey.shade700, color: Colors.grey.shade700,
), ),
), ),

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

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

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

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

@ -395,6 +395,15 @@ class DateUtil {
return ""; 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 /// get data formatted like 26/4/2020
/// [dateTime] convert DateTime to data formatted according to language /// [dateTime] convert DateTime to data formatted according to language
static String getDayMonthYearDateFormattedLang(DateTime dateTime, bool isArabic) { static String getDayMonthYearDateFormattedLang(DateTime dateTime, bool isArabic) {

@ -2485,7 +2485,9 @@ class TranslationBase {
String get mostViewed => localizedValues["mostViewed"][locale.languageCode]; String get mostViewed => localizedValues["mostViewed"][locale.languageCode];
String get newProducts => localizedValues["newProducts"][locale.languageCode]; String get newProducts => localizedValues["newProducts"][locale.languageCode];
String get enterDetails => localizedValues["enterDetails"][locale.languageCode]; String get enterDetails => localizedValues["enterDetails"][locale.languageCode];
String get paymentSelected => localizedValues["paymentSelected"][locale.languageCode]; String get paymentSelected => localizedValues["paymentSelected"][locale.languageCode];
String get moreNotifications => localizedValues["moreNotifications"][locale.languageCode]; String get moreNotifications => localizedValues["moreNotifications"][locale.languageCode];
@ -2531,6 +2533,36 @@ class TranslationBase {
String get avgDistance => localizedValues["avgDistance"][locale.languageCode]; String get avgDistance => localizedValues["avgDistance"][locale.languageCode];
String get avgHeartRate => localizedValues["avgHeartRate"][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> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

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

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

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

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

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

Loading…
Cancel
Save