Merge branch 'development_v2.5' into zik_new_design_flutter_v2.5

* development_v2.5: (36 commits)
  merge improvements
  Health plugin updated
  fix search issue
  JIRA bug fixes
  updates & fixes
  Fixes & updates
  six issues
  nfc plugin improvement.
  disable lakum on check out page
  fix issue
  fix lakum issues
  Smartwatch fixes
  screen plugin improvement.
  Updates & fixes
  video call camera view issue fix, barcode plugin change, smart watches improvements.
  add quantity filed fixed
  pharmacy uo fix
  Fixes
  fix issue
  Speech to text fix in iOS
  ...

# Conflicts: Resolved
#	android/app/build.gradle
#	android/app/src/main/AndroidManifest.xml
#	android/build.gradle
#	android/gradle/wrapper/gradle-wrapper.properties
#	lib/pages/conference/web_rtc/widgets/cam_view_widget.dart
#	lib/pages/landing/landing_page.dart
#	lib/pages/livecare/incoming_call.dart
merge-update-with-lab-changes
Zohaib Iqbal Kambrani 4 years ago
commit 1a6a26be75

@ -28,7 +28,7 @@ apply plugin: 'com.google.gms.google-services'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 30 compileSdkVersion 31
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'

@ -106,7 +106,6 @@
<service android:name=".geofence.intent_receivers.ReregisterGeofenceJobService" android:permission="android.permission.BIND_JOB_SERVICE" /> <service android:name=".geofence.intent_receivers.ReregisterGeofenceJobService" android:permission="android.permission.BIND_JOB_SERVICE" />
<!-- Geofencing --> <!-- Geofencing -->
<!-- <!--
Huawei Push Notifications Huawei Push Notifications
Set push kit auto enable to true (for obtaining the token on initialize) Set push kit auto enable to true (for obtaining the token on initialize)

@ -1,5 +1,5 @@
buildscript { buildscript {
ext.kotlin_version = '1.3.50' ext.kotlin_version = '1.6.0'
repositories { repositories {
google() google()
jcenter() jcenter()
@ -14,8 +14,8 @@ buildscript {
classpath 'com.android.tools.build:gradle:7.0.3' classpath 'com.android.tools.build:gradle:7.0.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8' classpath 'com.google.gms:google-services:4.3.8'
// classpath 'com.huawei.agconnect:agcp:1.4.2.301'
classpath 'com.huawei.agconnect:agcp:1.5.2.300' classpath 'com.huawei.agconnect:agcp:1.5.2.300'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12'
} }
} }
@ -27,7 +27,7 @@ allprojects {
maven { maven {
url 'https://developer.huawei.com/repo/' url 'https://developer.huawei.com/repo/'
} }
maven{ maven {
url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local" url "https://artifactory.ess-dev.com/artifactory/gradle-dev-local"
} }
} }

@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx1536M org.gradle.jvmargs=-Xmx2048m
android.enableR8=true android.enableR8=true
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true

@ -1,6 +1,6 @@
#Sun Dec 12 12:44:08 AST 2021 #Wed Jul 14 15:55:18 AST 2021
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48.615" height="48.48" viewBox="0 0 48.615 48.48">
<g id="phone-call_1_" data-name="phone-call (1)" transform="translate(0 -0.584)">
<g id="Group_8539" data-name="Group 8539" transform="translate(0 0.584)">
<path id="Path_4999" data-name="Path 4999" d="M47.642,37.832l-6.627-6.6a3.364,3.364,0,0,0-4.715,0l-4.206,4.31a1.128,1.128,0,0,1-1.483,0A113.953,113.953,0,0,1,21.667,27.6a105.911,105.911,0,0,1-8.006-8.9,1.078,1.078,0,0,1,0-1.483l4.4-4.3a3.435,3.435,0,0,0,0-4.773L11.437,1.522a3.5,3.5,0,0,0-4.773,0L1.218,6.991s-.243.232-.324.324C-2.176,11,2.724,22.689,14.611,34.507c8.654,8.7,18.433,14.528,24.272,14.528a4.276,4.276,0,0,0,2.8-.568c.162-.116.614-.521.614-.521l5.341-5.364A3.385,3.385,0,0,0,47.642,37.832Z" transform="translate(0 -0.584)" fill="#5ab145"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="35.547" height="48.48" viewBox="0 0 35.547 48.48">
<path id="map" d="M22.773,1A17.773,17.773,0,0,0,5,18.773c0,9.388,15.834,29.245,16.513,30.1a1.616,1.616,0,0,0,2.521,0c.679-.856,16.513-20.714,16.513-30.1A17.773,17.773,0,0,0,22.773,1Zm0,22.621a6.463,6.463,0,1,1,6.463-6.463A6.463,6.463,0,0,1,22.773,23.621Z" transform="translate(-5 -1)" fill="#5ab145"/>
</svg>

After

Width:  |  Height:  |  Size: 409 B

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="48.248" height="48.48" viewBox="0 0 48.248 48.48">
<path id="whatsapp" d="M41.468,7.045A24.029,24.029,0,0,0,3.658,36.031L.25,48.48l12.735-3.341a24,24,0,0,0,11.48,2.924h.01A24.033,24.033,0,0,0,41.468,7.045ZM24.475,44.006h-.008A19.942,19.942,0,0,1,14.3,41.223l-.729-.433L6.018,42.772,8.035,35.4l-.475-.755a19.967,19.967,0,1,1,16.915,9.357ZM35.427,29.052c-.6-.3-3.551-1.752-4.1-1.953s-.95-.3-1.35.3-1.55,1.953-1.9,2.353-.7.451-1.3.15a16.4,16.4,0,0,1-4.827-2.979,18.106,18.106,0,0,1-3.339-4.158c-.35-.6,0-.895.263-1.225a16.98,16.98,0,0,0,1.5-2.053,1.1,1.1,0,0,0-.05-1.052c-.15-.3-1.35-3.255-1.85-4.457-.488-1.17-.982-1.012-1.351-1.03-.35-.017-.75-.021-1.15-.021a2.2,2.2,0,0,0-1.6.751,6.732,6.732,0,0,0-2.1,5.007c0,2.955,2.151,5.809,2.451,6.209s4.233,6.464,10.254,9.063A34.358,34.358,0,0,0,28.4,35.224a8.229,8.229,0,0,0,3.781.238c1.153-.173,3.551-1.452,4.052-2.854a5.015,5.015,0,0,0,.35-2.855C36.428,29.5,36.027,29.352,35.427,29.052Zm0,0" transform="translate(-0.25)" fill="#5ab145" fill-rule="evenodd"/>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -94,5 +94,13 @@
<false/> <false/>
<key>io.flutter.embedded_views_preview</key> <key>io.flutter.embedded_views_preview</key>
<true/> <true/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>comgooglemaps</string>
<string>baidumap</string>
<string>iosamap</string>
</array>
</dict> </dict>
</plist> </plist>

@ -15,7 +15,7 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_ORDERS = '/api/orders';
const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
@ -68,7 +68,9 @@ const GET_DOCTOR_RATING_DETAILS =
const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating'; const GET_DOCTOR_RATING = 'Services/Doctors.svc/REST/dr_GetAvgDoctorRating';
///Prescriptions ///Prescriptions
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList'; // const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const PRESCRIPTIONS = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async';
const GET_PRESCRIPTIONS_ALL_ORDERS = const GET_PRESCRIPTIONS_ALL_ORDERS =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const GET_PRESCRIPTION_REPORT = const GET_PRESCRIPTION_REPORT =
@ -255,7 +257,7 @@ const GET_PATIENT_SHARE =
//URL to get patient appointment history //URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY = const GET_PATIENT_APPOINTMENT_HISTORY =
"Services/Doctors.svc/REST/PateintHasAppoimentHistory"; "Services/Doctors.svc/REST/PateintHasAppoimentHistory_Async";
const DOCTOR_SCHEDULE_URL = const DOCTOR_SCHEDULE_URL =
'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable'; 'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable';
@ -570,7 +572,10 @@ const TRANSFER_YAHALA_LOYALITY_POINTS =
"Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints"; "Services/Patients.svc/REST/TransferYaHalaLoyaltyPoints";
const LAKUM_GET_USER_TERMS_AND_CONDITIONS = const LAKUM_GET_USER_TERMS_AND_CONDITIONS =
"Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy"; "Services/ERP.svc/REST/GetUserTermsAndConditionsForEPharmcy";
const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
// const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList';
const PRESCRIPTION = 'Services/Patients.svc/REST/GetPrescriptionApptList_Async';
const GET_RECOMMENDED_PRODUCT = 'alsoProduct/'; const GET_RECOMMENDED_PRODUCT = 'alsoProduct/';
const GET_MOST_VIEWED_PRODUCTS = "mostview"; const GET_MOST_VIEWED_PRODUCTS = "mostview";
const GET_NEW_PRODUCTS = "newproducts"; const GET_NEW_PRODUCTS = "newproducts";

@ -50,7 +50,8 @@ const Map localizedValues = {
'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'}, 'searchByDocText': {'en': 'Type the name of the doctor to help you find him', 'ar': 'اكتب اسم الطبيب لمساعدتك في العثور عليه'},
'enterDocName': {'en': 'Enter Doctor name', 'ar': 'أدخل إسم الطبيب'}, 'enterDocName': {'en': 'Enter Doctor name', 'ar': 'أدخل إسم الطبيب'},
'search': {'en': 'Search', 'ar': 'بحث'}, 'search': {'en': 'Search', 'ar': 'بحث'},
'noResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج'}, 'noResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج '},
'noSearchResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج الرجاء تغيير لغة البحث'},
'pleaseEnterProductName': {'en': 'Please Enter Product Name', 'ar': 'ادخل اسم المنتج'}, 'pleaseEnterProductName': {'en': 'Please Enter Product Name', 'ar': 'ادخل اسم المنتج'},
'bookNow': {'en': 'BOOK NOW', 'ar': 'احجز الآن'}, 'bookNow': {'en': 'BOOK NOW', 'ar': 'احجز الآن'},
'docInfo': {'en': 'Doctor Information', 'ar': 'معلومات الطبيب'}, 'docInfo': {'en': 'Doctor Information', 'ar': 'معلومات الطبيب'},
@ -277,6 +278,8 @@ const Map localizedValues = {
"viewAll": {"en": "View All", 'ar': 'عرض الكل'}, "viewAll": {"en": "View All", 'ar': 'عرض الكل'},
"view": {"en": "View", 'ar': 'عرض'}, "view": {"en": "View", 'ar': 'عرض'},
"ContactUs": {"en": "Contact Us", 'ar': 'الوصول إلينا'}, "ContactUs": {"en": "Contact Us", 'ar': 'الوصول إلينا'},
"contactUsLocation": {"en": "P.O.Box: 91877 - Riyadh 11643, King Fahad Road - Olaya - Kingdom of Saudi Arabia", 'ar': 'صندوق بريد: 91877 - الرياض 11643 ، طريق الملك فهد - العليا - المملكة العربية السعودية'},
"contactUsTime": {"en": "Saturday - Wednesday 8:00 AM - 10 PM, Thursday 8:00 AM- 8:00 PM, Friday 2:00 PM - 8:00 PM", 'ar': " السبت الأربعاء 08:00 ص 10:00 م , الخميس 08:00 ص 08:00 م, الجمعة 02:00 م - 08:00 م"},
"ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'}, "ViewAllWaysReachUs": {"en": "View All Ways Reach Us", 'ar': 'جميع طرق الاتصال بنا'},
"medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'}, "medicalProfile": {"en": "Medical Profile", 'ar': 'الملف الطبي'},
"consultation": {"en": "Consultation", "ar": "استشارة"}, "consultation": {"en": "Consultation", "ar": "استشارة"},
@ -507,7 +510,11 @@ const Map localizedValues = {
"reachUs": {"en": "Reach Us", "ar": "الوصول لنا"}, "reachUs": {"en": "Reach Us", "ar": "الوصول لنا"},
"ourLocations": {"en": "Our Locations", "ar": "مواقعنا"}, "ourLocations": {"en": "Our Locations", "ar": "مواقعنا"},
"edit": {"en": "Edit", "ar": "تعديل"}, "edit": {"en": "Edit", "ar": "تعديل"},
"whatsApp": {"en": "Whats App", "ar": " واتس اب"},
"phone": {"en": "Phone", "ar": " موبايل"},
"delete": {"en": "Delete", "ar": " حذف"}, "delete": {"en": "Delete", "ar": " حذف"},
"deleteAddress": {"en": "Are you sure want to delete", "ar": " هل انت متأكد تريد حذف هذا العنوان"},
"deletedAddres": {"en": "Address has been deleted", "ar": " تم حذف العنوان"},
"addAddress": {"en": "ADD A NEW ADDRESS", "ar": " اضافة عنوان جديد"}, "addAddress": {"en": "ADD A NEW ADDRESS", "ar": " اضافة عنوان جديد"},
"addNewAddress": {"en": "Add New Address", "ar": " اضافة عنوان جديد"}, "addNewAddress": {"en": "Add New Address", "ar": " اضافة عنوان جديد"},
"order": {"en": "My Order", "ar": " طلباتي"}, "order": {"en": "My Order", "ar": " طلباتي"},
@ -802,7 +809,7 @@ const Map localizedValues = {
"HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية بناءاً على الطقس الحالي '}, "HealthTipsBasedOnCurrentWeather": {"en": "Health Tips Based On Current Weather", 'ar': ' نصائح صحية بناءاً على الطقس الحالي '},
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"}, "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
"ResendOrder": {"en": "Refill Order & Delivery", "ar": "إعادة طلب و توصيل"}, "ResendOrder": {"en": "Re-Order & Delivery", "ar": "إعادة طلب و توصيل"},
"Ports": {"en": "Ports", "ar": "المنافذ"}, "Ports": {"en": "Ports", "ar": "المنافذ"},
"Way": {"en": "Way", "ar": "الطريقة"}, "Way": {"en": "Way", "ar": "الطريقة"},
"Average": {"en": "Average", "ar": "متوسط"}, "Average": {"en": "Average", "ar": "متوسط"},

@ -3,7 +3,7 @@ class PatientLabSpecialResult {
String moduleID; String moduleID;
String resultData; String resultData;
String resultDataHTML; String resultDataHTML;
Null resultDataTxt; dynamic resultDataTxt;
PatientLabSpecialResult( PatientLabSpecialResult(
{this.invoiceNo, {this.invoiceNo,

@ -1,11 +1,11 @@
import 'PointsAmountPerday.dart'; import 'PointsAmountPerday.dart';
class PointsAmountPerMonth { class PointsAmountPerMonth {
double amountPerMonth; dynamic amountPerMonth;
String month; dynamic month;
int monthNumber; int monthNumber;
List<PointsAmountPerday> pointsAmountPerday; List<PointsAmountPerday> pointsAmountPerday;
double pointsPerMonth; dynamic pointsPerMonth;
PointsAmountPerMonth( PointsAmountPerMonth(
{this.amountPerMonth, {this.amountPerMonth,

@ -31,6 +31,7 @@ class Orders {
String orderStatusn; String orderStatusn;
bool canCancel; bool canCancel;
bool canRefund; bool canRefund;
String orderGuid;
dynamic customerId; dynamic customerId;
dynamic orderSubtotalExclTax; dynamic orderSubtotalExclTax;
dynamic orderShippingExclTax; dynamic orderShippingExclTax;
@ -47,6 +48,7 @@ class Orders {
this.orderStatusn, this.orderStatusn,
this.canCancel, this.canCancel,
this.canRefund, this.canRefund,
this.orderGuid,
this.customerId, this.customerId,
this.orderShippingExclTax, this.orderShippingExclTax,
this.orderSubtotalExclTax, this.orderSubtotalExclTax,
@ -63,6 +65,7 @@ class Orders {
orderStatusn = json['order_statusn']; orderStatusn = json['order_statusn'];
canCancel = json['can_cancel']; canCancel = json['can_cancel'];
canRefund = json['can_refund']; canRefund = json['can_refund'];
orderGuid = json['order_guid'];
customerId = json['customer_id']; customerId = json['customer_id'];
orderSubtotalExclTax= json["order_subtotal_excl_tax"]; orderSubtotalExclTax= json["order_subtotal_excl_tax"];
orderShippingExclTax= json["order_shipping_excl_tax"]; orderShippingExclTax= json["order_shipping_excl_tax"];

@ -490,6 +490,7 @@ class BaseAppClient {
}) async { }) async {
String url = fullUrl; String url = fullUrl;
print("URL Query String: $url"); print("URL Query String: $url");
print("body: $body");
if (await Utils.checkConnection()) { if (await Utils.checkConnection()) {
headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'}); headers.addAll({'Content-Type': 'application/json', 'Accept': 'application/json'});
@ -502,6 +503,8 @@ class BaseAppClient {
print("statusCode :$statusCode"); print("statusCode :$statusCode");
if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePost(fullUrl, onFailure: onFailure, onSuccess: onSuccess, body: body, headers: headers); if (await handleUnauthorized(statusCode, forUrl: fullUrl)) simplePost(fullUrl, onFailure: onFailure, onSuccess: onSuccess, body: body, headers: headers);
print(response.body.toString());
if (statusCode < 200 || statusCode >= 400 || json == null) { if (statusCode < 200 || statusCode >= 400 || json == null) {
onFailure('Error While Fetching data', statusCode); onFailure('Error While Fetching data', statusCode);
} else { } else {

@ -201,7 +201,7 @@ class OrderPreviewService extends BaseService {
orderBody['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption)}"; orderBody['custom_values_xml'] = "PaymentOption:${getPaymentOptionName(paymentCheckoutData.paymentOption)}";
orderBody['shippingOption'] = paymentCheckoutData.shippingOption; orderBody['shippingOption'] = paymentCheckoutData.shippingOption;
orderBody['shipping_address'] = paymentCheckoutData.address; orderBody['shipping_address'] = paymentCheckoutData.address;
orderBody['lakum_amount'] = paymentCheckoutData.usedLakumPoints; // orderBody['lakum_amount'] = paymentCheckoutData.usedLakumPoints;
List<Map<String, dynamic>> itemsList = List(); List<Map<String, dynamic>> itemsList = List();
shoppingCarts.forEach((item) { shoppingCarts.forEach((item) {

@ -91,8 +91,11 @@ class PharmacyCategoriseService extends BaseService {
Future searchProducts({String productName}) async { Future searchProducts({String productName}) async {
hasError = false; hasError = false;
_searchList.clear(); _searchList.clear();
// the language ID in pharmacy is different not same in patient app, en == 1 , ar == 2
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
var languageId = languageID == 'ar' ? 2 : 1;
String endPoint = productName != null String endPoint = productName != null
? GET_SEARCH_PRODUCTS + "$productName" + '&language_id=1' ? GET_SEARCH_PRODUCTS + "$productName" + '&language_id=' + "$languageId"
: GET_SEARCH_PRODUCTS + ""; : GET_SEARCH_PRODUCTS + "";
await baseAppClient.getPharmacy( await baseAppClient.getPharmacy(
endPoint, endPoint,

@ -99,9 +99,9 @@ class PharmacyAddressesViewModel extends BaseViewModel {
} }
Future deleteAddresses(AddressInfo sendingAddress) async { Future deleteAddresses(AddressInfo address) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _pharmacyAddressService.deleteCustomerAddress(sendingAddress); await _pharmacyAddressService.deleteCustomerAddress(address);
if (_pharmacyAddressService.hasError) { if (_pharmacyAddressService.hasError) {
error = _pharmacyAddressService.error; error = _pharmacyAddressService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -49,9 +49,9 @@ class OrderModelViewModel extends BaseViewModel {
} }
} }
Future<OrderDetailModel> getOrderDetails(OrderId) async { Future<OrderDetailModel> getOrderDetails(OrderId, orderGUID) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _orderDetailsService.getOrderDetails(OrderId); await _orderDetailsService.getOrderDetails(OrderId, orderGUID);
if (_orderDetailsService.hasError) { if (_orderDetailsService.hasError) {
error = _orderDetailsService.error; error = _orderDetailsService.error;
setState(ViewState.Error); setState(ViewState.Error);

@ -1,6 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:barcode_scan_fix/barcode_scan.dart'; import 'package:barcode_scan2/barcode_scan2.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/qr/qr_parking_model.dart'; import 'package:diplomaticquarterapp/core/model/qr/qr_parking_model.dart';
@ -16,7 +16,7 @@ class QrViewModel extends BaseViewModel {
readQr() async { readQr() async {
//TODO fix the barcode scan //TODO fix the barcode scan
String result = await BarcodeScanner.scan(); String result = (await BarcodeScanner.scan())?.rawContent;
var data = json.decode(result); var data = json.decode(result);
var qRParkingID = data['QRParkingID']; var qRParkingID = data['QRParkingID'];
setState(ViewState.BusyLocal); setState(ViewState.BusyLocal);

@ -9,6 +9,7 @@ class DoctorList {
int actualDoctorRate; int actualDoctorRate;
int clinicRoomNo; int clinicRoomNo;
dynamic date; dynamic date;
dynamic appointmentDate;
dynamic dayName; dynamic dayName;
int doctorID; int doctorID;
String doctorImageURL; String doctorImageURL;
@ -53,6 +54,7 @@ class DoctorList {
this.actualDoctorRate, this.actualDoctorRate,
this.clinicRoomNo, this.clinicRoomNo,
this.date, this.date,
this.appointmentDate,
this.dayName, this.dayName,
this.doctorID, this.doctorID,
this.doctorImageURL, this.doctorImageURL,
@ -97,6 +99,7 @@ class DoctorList {
actualDoctorRate = json['ActualDoctorRate']; actualDoctorRate = json['ActualDoctorRate'];
clinicRoomNo = json['ClinicRoomNo']; clinicRoomNo = json['ClinicRoomNo'];
date = json['Date']; date = json['Date'];
appointmentDate = json['AppointmentDate'];
dayName = json['DayName']; dayName = json['DayName'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
doctorImageURL = json['DoctorImageURL']; doctorImageURL = json['DoctorImageURL'];

@ -90,7 +90,6 @@ class _BookConfirmState extends State<BookConfirm> {
null, null,
widget.doctor.noOfPatientsRate, widget.doctor.noOfPatientsRate,
"", "",
), ),
isNeedToShowButton: false, isNeedToShowButton: false,
), ),
@ -201,10 +200,10 @@ class _BookConfirmState extends State<BookConfirm> {
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
onPressed: () async { onPressed: () async {
if (!await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) { if (await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) != null && !await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) {
insertAppointment(context, widget.doctor);
} else {
insertLiveCareScheduledAppointment(context, widget.doctor); insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
insertAppointment(context, widget.doctor);
} }
}, },
child: Text(TranslationBase.of(context).bookAppo, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48)), child: Text(TranslationBase.of(context).bookAppo, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48)),
@ -250,7 +249,7 @@ class _BookConfirmState extends State<BookConfirm> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
Future.delayed(new Duration(milliseconds: 1500), () async { Future.delayed(new Duration(milliseconds: 1500), () async {
if (!await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) { if (await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) != null && !await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) {
insertAppointment(context, widget.doctor); insertAppointment(context, widget.doctor);
} else { } else {
insertLiveCareScheduledAppointment(context, widget.doctor); insertLiveCareScheduledAppointment(context, widget.doctor);
@ -377,7 +376,6 @@ class _BookConfirmState extends State<BookConfirm> {
getLiveCareAppointmentPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) { getLiveCareAppointmentPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, context).then((res) { widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
navigateToBookSuccess(context, docObject, widget.patientShareResponse); navigateToBookSuccess(context, docObject, widget.patientShareResponse);

@ -17,7 +17,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart'; import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:nfc_in_flutter/nfc_in_flutter.dart'; import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
class QRCode extends StatefulWidget { class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
@ -42,11 +42,11 @@ class _QRCodeState extends State<QRCode> {
_bytes = base64.decode(widget.appoQR.split(',').last); _bytes = base64.decode(widget.appoQR.split(',').last);
widget.authUser = new AuthenticatedUser(); widget.authUser = new AuthenticatedUser();
NFC.isNDEFSupported.then((supported) {
setState(() { FlutterNfcKit.nfcAvailability.then((value) {
_supportsNFC = true; _supportsNFC = (value == NFCAvailability.available);
});
}); });
super.initState(); super.initState();
} }

@ -24,6 +24,8 @@ class _LiveCareBookAppointmentState extends State<LiveCareBookAppointment> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
showNewAppBarTitle: true,
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: false,

@ -94,14 +94,13 @@ class _ClickListDialogState extends State<ClickListDialog> {
return InkWell( return InkWell(
onTap: () { onTap: () {
widget.onSelection(tempClinicsList[index]); widget.onSelection(tempClinicsList[index]);
}, },
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Expanded(child: Text(tempClinicsList[index].clinicDescription)), Expanded(child: Text(tempClinicsList[index].clinicDescription.trim())),
tempClinicsList[index].isLiveCareClinicAndOnline tempClinicsList[index].isLiveCareClinicAndOnline
? SvgPicture.asset( ? SvgPicture.asset(
'assets/images/new-design/video_icon_green_right.svg', 'assets/images/new-design/video_icon_green_right.svg',

@ -7,7 +7,6 @@ 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/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/my_rich_text.dart'; import 'package:diplomaticquarterapp/widgets/my_rich_text.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';
@ -54,9 +53,19 @@ class DoctorView extends StatelessWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Row(
doctor.name, children: [
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), Expanded(
child: Text(
doctor.name,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
Text(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(doctor.date)),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
],
), ),
if (doctor.doctorTitle != null) SizedBox(height: 6), if (doctor.doctorTitle != null) SizedBox(height: 6),
Row( Row(

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart'; import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
@ -14,6 +15,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtonsAl
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart';
@ -57,6 +59,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
ToDoCountProviderModel model = Provider.of<ToDoCountProviderModel>(context);
var size = MediaQuery.of(context).size; var size = MediaQuery.of(context).size;
final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2; final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemWidth = size.width / 2; final double itemWidth = size.width / 2;
@ -72,7 +75,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
onTap: shouldEnable onTap: shouldEnable
? null ? null
: () { : () {
_handleButtonClicks(appoButtonsList[index]); _handleButtonClicks(appoButtonsList[index], model);
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: appoButtonsList[index].title, title: appoButtonsList[index].title,
@ -88,7 +91,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
); );
} }
_handleButtonClicks(AppoDetailsButton) { _handleButtonClicks(AppoDetailsButton, ToDoCountProviderModel model) {
switch (AppoDetailsButton.caller) { switch (AppoDetailsButton.caller) {
case "openReschedule": case "openReschedule":
widget.tabController.animateTo((widget.tabController.index + 1) % 2); widget.tabController.animateTo((widget.tabController.index + 1) % 2);
@ -113,7 +116,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
); );
break; break;
case "goToTodoList": case "goToTodoList":
Navigator.of(context).pop(); // Navigator.of(context).pop();
navigateToToDoPage(context, model);
break; break;
case "askDoc": case "askDoc":
askYourDoc(); askYourDoc();
@ -556,6 +560,18 @@ class _AppointmentActionsState extends State<AppointmentActions> {
))); )));
} }
navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) {
if (widget.projectViewModel.isLogin) {
if (model.count != 0) {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty);
}
} else {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
}
}
rateAppointment() { rateAppointment() {
widget.browser = new MyInAppBrowser(); widget.browser = new MyInAppBrowser();
var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1'; var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1';

@ -33,7 +33,6 @@ class PrescriptionReminderDialog extends StatefulWidget {
} }
class _ReminderDialogState extends State<PrescriptionReminderDialog> { class _ReminderDialogState extends State<PrescriptionReminderDialog> {
final CalendarPlugin _myPlugin = CalendarPlugin();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {

@ -6,7 +6,6 @@ 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/defaultButton.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
class PaymentDialog extends StatefulWidget { class PaymentDialog extends StatefulWidget {
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
@ -23,96 +22,90 @@ class PaymentDialog extends StatefulWidget {
class _PaymentDialogState extends State<PaymentDialog> { class _PaymentDialogState extends State<PaymentDialog> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Dialog(
child: Dialog( shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12.0)), child: Container(
child: Container( //height: 550.0,
height: 550.0, width: 450.0,
width: 450.0, padding: EdgeInsets.all(21),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.max, children: <Widget>[ child: Column(crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, children: <Widget>[
Container( Text(
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0), TranslationBase.of(context).invoiceDetails,
child: Text(TranslationBase.of(context).invoiceDetails, style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.w600)), style: TextStyle(
), fontSize: 24.0,
Container( fontWeight: FontWeight.w600,
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 0.0), letterSpacing: -1.14,
child: Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, style: TextStyle(color: Colors.black, fontSize: 15.0, fontWeight: FontWeight.w600)), color: Color(0xff2B353E),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 0.0),
child: Text(getDate(widget.appo.appointmentDate), style: getTextStyle()),
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 0.0),
child: Text(widget.appo.projectName, style: getTextStyle()),
),
Divider(
color: Colors.grey,
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 5.0),
child: Table(
children: [
TableRow(decoration: BoxDecoration(), children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientShareToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientShare.toString())),
]),
TableRow(children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientTaxToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientTaxAmount.toString())),
]),
TableRow(children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientShareWithTax.toString())),
]),
],
),
),
Divider(
color: Colors.grey,
),
Container(
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 5.0),
child: Text(TranslationBase.of(context).YouCanPayByTheFollowingOptions, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600)),
), ),
Container(margin: EdgeInsets.fromLTRB(20.0, 5.0, 20.0, 5.0), child: getPaymentMethods()), ),
Container( Text(widget.appo.doctorTitle + " " + widget.appo.doctorNameObj, style: TextStyle(color: Color(0xff2E303A), fontSize: 16.0, fontWeight: FontWeight.w600,letterSpacing: -0.64)),
margin: EdgeInsets.fromLTRB(20.0, 30.0, 20.0, 15.0), Text(getDate(widget.appo.appointmentDate), style: getTextStyle()),
child: Text(TranslationBase.of(context).appoPaymentConfirm, style: TextStyle(fontSize: 14.0, color: CustomColors.accentColor, fontWeight: FontWeight.w600)), Text(widget.appo.projectName, style: getTextStyle()),
Divider(
color: Colors.grey,
),
Table(
children: [
TableRow(decoration: BoxDecoration(), children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientShareToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientShare.toString())),
]),
TableRow(children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientTaxToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientTaxAmount.toString())),
]),
TableRow(children: [
TableCell(child: _getNormalText(TranslationBase.of(context).patientShareTotalToDo)),
TableCell(child: _getNormalText(widget.patientShareResponse.patientShareWithTax.toString())),
]),
],
),
Divider(color: Colors.grey),
Text(
TranslationBase.of(context).YouCanPayByTheFollowingOptions,
style: TextStyle(
fontSize: 14.0,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
), ),
Container( ),
alignment: Alignment.center, getPaymentMethods(),
height: 40.0, SizedBox(height: 12),
margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 20.0), Text(
child: Flex( TranslationBase.of(context).appoPaymentConfirm,
direction: Axis.horizontal, style: TextStyle(fontSize: 14.0, color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.56),
children: <Widget>[ ),
Expanded( SizedBox(height: 12),
child: DefaultButton( Container(
TranslationBase.of(context).cancel_nocaps, alignment: Alignment.center,
() { child: Row(
Navigator.pop(context, null); // direction: Axis.horizontal,
}, children: <Widget>[
color: CustomColors.accentColor, Expanded(
textColor: Colors.white, child: DefaultButton(
), TranslationBase.of(context).cancel_nocaps,
() {
Navigator.pop(context, null);
},
color: CustomColors.accentColor,
textColor: Colors.white,
), ),
mWidth(10.0), ),
Expanded( mWidth(10.0),
child: DefaultButton( Expanded(
TranslationBase.of(context).confirm, child: DefaultButton(
() { TranslationBase.of(context).confirm,
Navigator.pop(context, widget.patientShareResponse); () {
}, Navigator.pop(context, widget.patientShareResponse);
color: CustomColors.green, },
textColor: Colors.white, color: CustomColors.green,
), textColor: Colors.white,
), ),
], ),
), ],
), ),
]), ),
), ]),
), ),
); );
} }
@ -120,21 +113,17 @@ class _PaymentDialogState extends State<PaymentDialog> {
_getNormalText(text) { _getNormalText(text) {
return Container( return Container(
margin: EdgeInsets.only(top: 10.0, right: 10.0), margin: EdgeInsets.only(top: 10.0, right: 10.0),
child: Text(text, style: TextStyle(fontSize: 13, letterSpacing: 0.5, color: Colors.black)), child: Text(text, style: TextStyle(fontSize: 13, letterSpacing: 0.5, color: Color(0xff2E303A))),
); );
} }
TextStyle getTextStyle() { TextStyle getTextStyle() {
return TextStyle(color: Colors.grey[700], fontSize: 13.0, fontWeight: FontWeight.w600); return TextStyle(color: Color(0xff575757), fontSize: 13.0, fontWeight: FontWeight.w600);
} }
String getDate(String date) { String getDate(String date) {
DateTime dateObj = DateUtil.convertStringToDate(date); DateTime dateObj = DateUtil.convertStringToDate(date);
return DateUtil.getDayMonthYearDateFormatted(dateObj) + return DateUtil.getDayMonthYearDateFormatted(dateObj) + " " + dateObj.hour.toString() + ":" + getMinute(dateObj);
" " +
dateObj.hour.toString() +
":" +
getMinute(dateObj);
} }
String getMinute(DateTime dateObj) { String getMinute(DateTime dateObj) {

@ -94,6 +94,13 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
this.appointHistory = widget.appointment; this.appointHistory = widget.appointment;
}); });
requestPermissions(); requestPermissions();
event.controller.stream.listen((p) {
if (p['isIOSFeedback'] == 'true') {
if (this.mounted) {
this.titleController.value = p['data'];
}
}
});
super.initState(); super.initState();
} }
@ -538,9 +545,10 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
if (result.finalResult == true) { if (result.finalResult == true) {
setState(() { setState(() {
messageController.text += reconizedWord + '\n';
RoboSearch.closeAlertDialog(context); RoboSearch.closeAlertDialog(context);
speech.stop(); speech.stop();
messageController.text = reconizedWord + '\n';
}); });
} }
} }

@ -216,20 +216,37 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
Container( Container(
margin: EdgeInsets.fromLTRB(0, 16, 0, 0), margin: EdgeInsets.fromLTRB(0, 16, 0, 0),
alignment: Alignment.center, alignment: Alignment.center,
child: Image.network( child: (model.finalProducts[index].images != null &&
model.finalProducts[index].images.isNotEmpty model.finalProducts[index].images.length > 0)
? model.finalProducts[index].images[0].thumb ? Image.network(
: 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', model.finalProducts[index].images[0].src,
fit: BoxFit.cover, fit: BoxFit.cover,
height: 80, height: 80,
), width: 80,
)
: Image.asset(
"assets/images/no_image.png",
fit: BoxFit.cover,
height: 80,
width: 80,
),
// Image.network(
// model.finalProducts[index].images.isNotEmpty
// ? model.finalProducts[index].images[0].thumb
// : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png',
// fit: BoxFit.cover,
// height: 80,
// ),
), ),
Container( Container(
width: model.finalProducts[index].rxMessage != null ? MediaQuery.of(context).size.width / 2.8 : 0, width: model.finalProducts[index].rxMessage != null ? double.infinity : 0,
//MediaQuery.of(context).size.width / 2.8 : 0,
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffb23838), color: Color(0xffb23838),
borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), // borderRadius: BorderRadius.only(topLeft: Radius.circular(6)
// ),
), ),
child: model.finalProducts[index].rxMessage != null child: model.finalProducts[index].rxMessage != null
? Texts( ? Texts(
@ -374,33 +391,48 @@ class _FinalProductsPageState extends State<FinalProductsPage> {
), ),
), ),
Container( Container(
margin: EdgeInsets.fromLTRB(0, 0, 0, 0), margin: EdgeInsets.fromLTRB(0, 0, 0, 8),
alignment: Alignment.center, alignment: Alignment.center,
child: Image.network( child:(model.finalProducts[index].images != null &&
model.finalProducts[index].images.isNotEmpty model.finalProducts[index].images.length > 0)
? model.finalProducts[index].images[0].thumb ? Image.network(
: 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png', model.finalProducts[index].images[0].src,
fit: BoxFit.contain, fit: BoxFit.cover,
height: 80, height: 80,
width: 80,
)
: Image.asset(
"assets/images/no_image.png",
fit: BoxFit.cover,
height: 80,
width: 80,
), ),
// Image.network(
// model.finalProducts[index].images.isNotEmpty
// ? model.finalProducts[index].images[0].thumb
// : 'https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/No_image_3x4.svg/1200px-No_image_3x4.svg.png',
// fit: BoxFit.contain,
// height: 80,
// ),
), ),
], ],
), ),
Column( Column(
children: [ children: [
Container( Container(
width: model.finalProducts[index].rxMessage != null ? MediaQuery.of(context).size.width / 5.3 : 0, width: model.finalProducts[index].rxMessage != null ? MediaQuery.of(context).size.width / 4.3 : 0,
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xffb23838), color: Color(0xffb23838),
borderRadius: BorderRadius.only(topLeft: Radius.circular(6)), //borderRadius: BorderRadius.only(topLeft: Radius.circular(5)),
), ),
child:model.finalProducts[index].rxMessage != null child:model.finalProducts[index].rxMessage != null
? Texts( ? Texts(
projectProvider.isArabic ? model.finalProducts[index].rxMessagen : model.finalProducts[index].rxMessage, projectProvider.isArabic ? model.finalProducts[index].rxMessagen : model.finalProducts[index].rxMessage,
color: Colors.white, color: Colors.white,
regular: true, regular: true,
fontSize: 10, fontSize: 8,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
) )
: Texts(""), : Texts(""),

@ -77,9 +77,9 @@ class InsuranceApprovalDetail extends StatelessWidget {
MyRichText(TranslationBase.of(context).unusedCount, insuranceApprovalModel?.unUsedCount.toString() ?? "", projectViewModel.isArabic), MyRichText(TranslationBase.of(context).unusedCount, insuranceApprovalModel?.unUsedCount.toString() ?? "", projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).companyName, insuranceApprovalModel?.companyName ?? "", projectViewModel.isArabic), MyRichText(TranslationBase.of(context).companyName, insuranceApprovalModel?.companyName ?? "", projectViewModel.isArabic),
SizedBox(height: 6), SizedBox(height: 6),
MyRichText(TranslationBase.of(context).receiptOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateTime(insuranceApprovalModel.receiptOn)) ?? "", MyRichText(TranslationBase.of(context).receiptOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(insuranceApprovalModel.receiptOn)) ?? "",
projectViewModel.isArabic), projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).expiryOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDateTime(insuranceApprovalModel.expiryDate)) ?? "", MyRichText(TranslationBase.of(context).expiryOn, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(insuranceApprovalModel.expiryDate)) ?? "",
projectViewModel.isArabic), projectViewModel.isArabic),
], ],
), ),

@ -140,7 +140,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
MyRichText(TranslationBase.of(context).clinic + ":", model.insuranceApproval[index]?.clinicName.toLowerCase().capitalizeFirstofEach ?? "", MyRichText(TranslationBase.of(context).clinic + ":", model.insuranceApproval[index]?.clinicName != null ? model.insuranceApproval[index]?.clinicName.toLowerCase().capitalizeFirstofEach : "",
projectViewModel.isArabic), projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).approvalNo, model.insuranceApproval[index]?.approvalNo.toString() ?? "", projectViewModel.isArabic), MyRichText(TranslationBase.of(context).approvalNo, model.insuranceApproval[index]?.approvalNo.toString() ?? "", projectViewModel.isArabic),
], ],

@ -1,4 +1,4 @@
import 'package:barcode_scan_fix/barcode_scan.dart'; import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart';
@ -86,11 +86,13 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
void _scanQrAndGetProduct() async { void _scanQrAndGetProduct() async {
try { try {
String result = await BarcodeScanner.scan(); ScanResult result = await BarcodeScanner.scan();
try { try {
String barcode = result; String barcode = result?.rawContent;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await BaseAppClient().getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode", onSuccess: (dynamic response, int statusCode) { await BaseAppClient()
.getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode",
onSuccess: (dynamic response, int statusCode) {
print(response); print(response);
var product = PharmacyProduct.fromJson(response["products"][0]); var product = PharmacyProduct.fromJson(response["products"][0]);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -100,7 +102,8 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
AppToast.showErrorToast(message: "Product not found"); AppToast.showErrorToast(message: "Product not found");
}); });
} catch (apiEx) { } catch (apiEx) {
AppToast.showErrorToast(message: "Something went wrong, please try again"); AppToast.showErrorToast(
message: "Something went wrong, please try again");
} }
} catch (barcodeEx) {} } catch (barcodeEx) {}
} }

@ -198,6 +198,119 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
} }
}, },
), ),
// body: isCameraReady
// ?
// : Container(
// height: 200.0,
// width: 200.0,
// color: Colors.green,
// ),
// body: Container(
// decoration: BoxDecoration(color: Colors.grey[700]),
// child: Column(
// mainAxisAlignment: MainAxisAlignment.start,
// mainAxisSize: MainAxisSize.max,
// children: <Widget>[
// Container(
// margin: EdgeInsets.only(top: 30.0),
// alignment: Alignment.center,
// child: Text("Incoming Video Call", textAlign: TextAlign.center, style: TextStyle(fontSize: 26.0, color: Colors.white, letterSpacing: 1.0)),
// ),
// Container(
// alignment: Alignment.center,
// margin: EdgeInsets.fromLTRB(50.0, 30.0, 50.0, 20.0),
// child: Image.asset('assets/images/new-design/hmg_full_logo_hd_white.png'),
// ),
// Container(
// margin: EdgeInsets.fromLTRB(30.0, 10.0, 30.0, 0.0),
// child: Divider(
// color: Colors.white,
// thickness: 1.0,
// ),
// ),
// Container(
// margin: EdgeInsets.only(top: 20.0),
// alignment: Alignment.center,
// child: Text("Dr Eyad Ismail Abu Jayab", textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, letterSpacing: 0.8, color: Colors.white)),
// ),
// Container(
// margin: EdgeInsets.only(top: 10.0),
// alignment: Alignment.center,
// child: Text("ENT Clinic", textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, letterSpacing: 0.8, color: Colors.white)),
// ),
// Container(
// margin: EdgeInsets.only(top: 10.0),
// alignment: Alignment.center,
// child: Text("Speciality", textAlign: TextAlign.center, style: TextStyle(fontSize: 22.0, letterSpacing: 0.8, color: Colors.white)),
// ),
// Container(
// decoration: BoxDecoration(
// color: Colors.grey[900].withOpacity(0.8),
// borderRadius: BorderRadius.all(Radius.circular(10.0)),
// ),
// padding: EdgeInsets.all(20.0),
// margin: EdgeInsets.only(top: 20.0),
// child: Column(
// children: <Widget>[
// Text("Appointment Information", textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold, letterSpacing: 1.0, color: Colors.white)),
// Container(
// margin: EdgeInsets.only(top: 20.0),
// child: Text("Sun, 15th Dec, 2019, 09:00", textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, letterSpacing: 1.0, color: Colors.white)),
// ),
// Container(
// margin: EdgeInsets.only(top: 20.0),
// child: Text("ENT Clinic", textAlign: TextAlign.center, style: TextStyle(fontSize: 20.0, letterSpacing: 1.0, color: Colors.white)),
// ),
// ],
// ),
// ),
// Container(
// margin: EdgeInsets.only(top: 100.0),
// alignment: Alignment.center,
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
// children: <Widget>[
// RotationTransition(
// turns: Tween(begin: 0.0, end: -.1).chain(CurveTween(curve: Curves.elasticIn)).animate(_animationController),
// child: Container(
// child: RawMaterialButton(
// onPressed: () {
// _submit();
// },
// elevation: 2.0,
// fillColor: Colors.green,
// child: Icon(
// Icons.call,
// color: Colors.white,
// size: 35.0,
// ),
// padding: EdgeInsets.all(15.0),
// shape: CircleBorder(),
// ),
// )),
// Container(
// child: RawMaterialButton(
// onPressed: () {
// LandingPage.isOpenCallPage = false;
// backToHome();
// },
// elevation: 2.0,
// fillColor: Colors.red,
// child: Icon(
// Icons.call_end,
// color: Colors.white,
// size: 35.0,
// ),
// padding: EdgeInsets.all(15.0),
// shape: CircleBorder(),
// ),
// ),
// ],
// ),
// ),
// ],
// )),
); );
} }
@ -225,9 +338,8 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
} }
Future<void> _submit() async { Future<void> _submit() async {
// backToHome(); // backToHome();
try { try {
final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity); final roomModel = RoomModel(name: widget.incomingCallData.name, token: widget.incomingCallData.sessionId, identity: widget.incomingCallData.identity);
// await Navigator.of(context).push( // await Navigator.of(context).push(
@ -237,12 +349,11 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
// ConferencePage(roomModel: roomModel), // ConferencePage(roomModel: roomModel),
// ), // ),
// ); // );
_controller.dispose(); await _controller.dispose();
await Navigator.of(context).pushReplacement( await Navigator.of(context).pushReplacement(
MaterialPageRoute( MaterialPageRoute(
fullscreenDialog: true, fullscreenDialog: true,
builder: (BuildContext context) => CallHomePage(receiverId: widget.incomingCallData.receiverID, callerId: widget.incomingCallData.callerID), builder: (BuildContext context) => CallHomePage(receiverId: widget.incomingCallData.receiverID, callerId: widget.incomingCallData.callerID),
), ),
); );
} catch (err) { } catch (err) {

@ -389,7 +389,9 @@ class _Register extends State<Register> {
Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex))), Navigator.of(context).push(FadePage(page: ConfirmLogin(changePageViewIndex: widget.changePageViewIndex))),
} }
else else
{AppToast.showErrorToast(message: result ? result : TranslationBase.of(context).somethingWentWrong)} {
AppToast.showErrorToast(message: result != null ? result : TranslationBase.of(context).somethingWentWrong),
}
}); });
} }
} }

@ -72,6 +72,7 @@ class DoctorHomePage extends StatelessWidget {
clinicName: _doctorList.clinicName, clinicName: _doctorList.clinicName,
actualDoctorRate: _doctorList.actualDoctorRate, actualDoctorRate: _doctorList.actualDoctorRate,
doctorID: _doctorList.doctorID, doctorID: _doctorList.doctorID,
date: _doctorList.appointmentDate,
doctorRate: _doctorList.doctorRate, doctorRate: _doctorList.doctorRate,
gender: _doctorList.gender, gender: _doctorList.gender,
doctorTitle: _doctorList.doctorTitle, doctorTitle: _doctorList.doctorTitle,

@ -65,12 +65,12 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage> with Sing
unselectedLabelColor: Color(0xff575757), unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20), labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle( labelStyle: TextStyle(
fontSize: 16, fontSize: 15,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
unselectedLabelStyle: TextStyle( unselectedLabelStyle: TextStyle(
fontSize: 16, fontSize: 15,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
), ),

@ -137,8 +137,10 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
}); });
generateWeekData(); generateWeekData();
setState(() { setState(() {
weeklyStatsAvgValue = avgWeeklyStepsValue ~/ weeklyDataLength; if (avgWeeklyStepsValue != 0) {
weeklyStatsAvgValue = weeklyStatsAvgValue / 1000; weeklyStatsAvgValue = avgWeeklyStepsValue ~/ weeklyDataLength;
weeklyStatsAvgValue = weeklyStatsAvgValue / 1000;
}
isWeeklyDataLoaded = true; isWeeklyDataLoaded = true;
}); });
}).catchError((err) { }).catchError((err) {
@ -165,8 +167,10 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
}); });
generateMonthData(); generateMonthData();
setState(() { setState(() {
monthlyStatsAvgValue = avgMonthlyStepsValue ~/ monthlyDataLength; if (avgMonthlyStepsValue != 0) {
monthlyStatsAvgValue = monthlyStatsAvgValue / 1000; monthlyStatsAvgValue = avgMonthlyStepsValue ~/ monthlyDataLength;
monthlyStatsAvgValue = monthlyStatsAvgValue / 1000;
}
isMonthlyDataLoaded = true; isMonthlyDataLoaded = true;
}); });
}).catchError((err) { }).catchError((err) {
@ -193,8 +197,10 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
}); });
generateYearData(); generateYearData();
setState(() { setState(() {
yearlyStatsAvgValue = avgYearlyStepsValue ~/ yearlyDataLength; if (avgYearlyStepsValue != 0) {
yearlyStatsAvgValue = yearlyStatsAvgValue / 1000; yearlyStatsAvgValue = avgYearlyStepsValue ~/ yearlyDataLength;
yearlyStatsAvgValue = yearlyStatsAvgValue / 1000;
}
isYearlyDataLoaded = true; isYearlyDataLoaded = true;
}); });
}).catchError((err) { }).catchError((err) {
@ -457,16 +463,16 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
children: <Widget>[ children: <Widget>[
yearlyStepsList.isEmpty yearlyStepsList.isEmpty
? Container( ? Container(
child: Center( child: Center(
child: Text(TranslationBase.of(context).noDataAvailable), child: Text(TranslationBase.of(context).noDataAvailable),
), ),
) )
: Table( : Table(
columnWidths: { columnWidths: {
0: FlexColumnWidth(2.5), 0: FlexColumnWidth(2.5),
}, },
children: fullData(context), children: fullData(context),
), ),
], ],
), ),
) )
@ -549,7 +555,7 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
), ),
); );
yearlyStepsList.forEach( yearlyStepsList.forEach(
(step) { (step) {
tableRow.add( tableRow.add(
TableRow( TableRow(
children: [ children: [
@ -559,7 +565,8 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
)} ', )} ',
isCapitable: false, isCapitable: false,
mProjectViewModel: projectViewModel), mProjectViewModel: projectViewModel),
Utils.tableColumnValue(step.valueSum != null ? (step.valueSum / 1000).toString() + " " + TranslationBase.of(context).km_ : "0.0 " + TranslationBase.of(context).km_ , isCapitable: false, mProjectViewModel: projectViewModel), Utils.tableColumnValue(step.valueSum != null ? (step.valueSum / 1000).toString() + " " + TranslationBase.of(context).km_ : "0.0 " + TranslationBase.of(context).km_,
isCapitable: false, mProjectViewModel: projectViewModel),
], ],
), ),
); );
@ -567,5 +574,4 @@ class _DistanceTrackerState extends State<DistanceTracker> with SingleTickerProv
); );
return tableRow; return tableRow;
} }
} }

@ -36,40 +36,29 @@ class _HealthDataListState extends State<HealthDataList> {
appBarTitle: TranslationBase.of(context).smartWatches, appBarTitle: TranslationBase.of(context).smartWatches,
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true, showNewAppBar: true,
backgroundColor: Color(0xffF7F7F7),
showNewAppBarTitle: true, showNewAppBarTitle: true,
body: Container( body: Column(
child: SingleChildScrollView( children: [
child: Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, child: GridView.builder(
children: [ physics: BouncingScrollPhysics(),
Container( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
width: double.infinity, padding: EdgeInsets.all(21),
height: 20, itemCount: myMedicalList.length,
), itemBuilder: (BuildContext context, int index) {
Padding( return myMedicalList[index];
padding: EdgeInsets.only(left: 12, right: 12), },
child: GridView.builder( ),
shrinkWrap: true,
primary: false,
physics: NeverScrollableScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12),
padding: EdgeInsets.zero,
itemCount: myMedicalList.length,
itemBuilder: (BuildContext context, int index) {
return myMedicalList[index];
},
),
),
],
), ),
), syncHealthDataButton(),
],
), ),
bottomSheet: syncHealthDataButton(),
); );
} }
List<Widget> myOptionsList(BuildContext context) { List<Widget> myOptionsList(BuildContext context) {
List<Widget> medical = List(); List<Widget> medical = [];
medical.add(InkWell( medical.add(InkWell(
onTap: () => Navigator.push( onTap: () => Navigator.push(

@ -171,7 +171,9 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
}); });
generateMonthData(); generateMonthData();
setState(() { setState(() {
monthlyStatsAvgValue = avgMonthlyHearRateValue ~/ monthlyDataLength; if (avgMonthlyHearRateValue != 0) {
monthlyStatsAvgValue = avgMonthlyHearRateValue ~/ monthlyDataLength;
}
isMonthlyDataLoaded = true; isMonthlyDataLoaded = true;
}); });
}).catchError((err) { }).catchError((err) {
@ -198,7 +200,9 @@ class _HeartRateTrackerState extends State<HeartRateTracker> with SingleTickerPr
}); });
generateYearData(); generateYearData();
setState(() { setState(() {
yearlyStatsAvgValue = avgYearlyHearRateValue ~/ yearlyDataLength; if (avgYearlyHearRateValue != 0) {
yearlyStatsAvgValue = avgYearlyHearRateValue ~/ yearlyDataLength;
}
isYearlyDataLoaded = true; isYearlyDataLoaded = true;
}); });
}).catchError((err) { }).catchError((err) {

@ -44,228 +44,236 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
isShowDecPage: true, isShowDecPage: true,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
description: TranslationBase.of(context).infoHealthData, description: TranslationBase.of(context).infoHealthData,
imagesInfo: [ imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/0.png'), ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/0.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') 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: Column(
child: Platform.isIOS ? _getAppleWatchInstructions() : _getGoogleWatchInstructions(), children: [
), Expanded(
bottomSheet: Container( child: Container(
color: Theme.of(context).scaffoldBackgroundColor, child: Platform.isIOS ? _getAppleWatchInstructions() : _getGoogleWatchInstructions(),
padding: EdgeInsets.fromLTRB(15.0, 0.0, 15.0, 30.0), ),
child: DefaultButton( ),
TranslationBase.of(context).continues, DefaultButton(
() { TranslationBase.of(context).continues,
_openHealthDataList(); () {
}, _openHealthDataList();
color: Color(0xff359846), },
), color: Color(0xff359846),
).insideContainer
],
), ),
); );
} }
_getAppleWatchInstructions() { _getAppleWatchInstructions() {
return SingleChildScrollView( return SingleChildScrollView(
padding: EdgeInsets.all(21),
physics: BouncingScrollPhysics(),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [ children: [
Container( Text(
width: double.infinity, TranslationBase.of(context).supportedWatches,
margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), style: TextStyle(
child: Column( fontSize: 20.0,
crossAxisAlignment: CrossAxisAlignment.start, fontWeight: FontWeight.w600,
children: [ letterSpacing: -1.2,
Container( color: Color(0xff2E303A),
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), ),
child: Text(TranslationBase.of(context).supportedWatches, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600)), ),
), Row(
Container( children: [
Expanded(
child: Container(
margin: EdgeInsets.only(top: 10.0),
child: Row( child: Row(
children: [ children: [
Expanded( Image.asset("assets/images/SmartWatches/apple-watch-1.jpeg", width: 70.0, height: 70.0),
child: Container( Padding(
margin: EdgeInsets.only(top: 10.0), padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Row(
children: [
Image.asset("assets/images/SmartWatches/apple-watch-1.jpeg", width: 70.0, height: 70.0),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 1", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
),
)
],
),
),
),
Expanded(
child: Container( child: Container(
margin: EdgeInsets.only(top: 10.0), width: MediaQuery.of(context).size.width * 0.22,
child: Row( child: Text("Apple Watch Series 1", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
children: [
Image.asset("assets/images/SmartWatches/apple-watch-2.jpg", width: 70.0, height: 70.0),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
),
)
],
),
), ),
), )
], ],
), ),
), ),
Container( ),
Expanded(
child: Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Row( child: Row(
children: [ children: [
Expanded( Image.asset("assets/images/SmartWatches/apple-watch-2.jpg", width: 70.0, height: 70.0),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container( child: Container(
margin: EdgeInsets.only(top: 15.0), width: MediaQuery.of(context).size.width * 0.22,
child: Row( child: Text("Apple Watch Series 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
children: [
Image.asset("assets/images/SmartWatches/apple-watch-3.jpg", width: 70.0, height: 70.0),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
),
)
],
),
),
),
Expanded(
child: Container(
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset("assets/images/SmartWatches/apple-watch-4.jpg", width: 70.0, height: 70.0),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
),
)
],
),
), ),
), )
], ],
), ),
), ),
Container( ),
margin: EdgeInsets.only(top: 10.0), ],
child: Row( ),
children: [ Container(
Expanded( margin: EdgeInsets.only(top: 10.0),
child: Container( child: Row(
margin: EdgeInsets.only(top: 15.0), children: [
child: Row( Expanded(
children: [ child: Container(
Image.asset("assets/images/SmartWatches/apple-watch-5.jpg", width: 70.0, height: 70.0), margin: EdgeInsets.only(top: 15.0),
Padding( child: Row(
padding: const EdgeInsets.only(left: 8.0, right: 8.0), children: [
child: Container( Image.asset("assets/images/SmartWatches/apple-watch-3.jpg", width: 70.0, height: 70.0),
width: MediaQuery.of(context).size.width * 0.22, Padding(
child: Text("Apple Watch Series 5", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), padding: const EdgeInsets.only(left: 8.0, right: 8.0),
), child: Container(
) width: MediaQuery.of(context).size.width * 0.22,
], child: Text("Apple Watch Series 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
),
),
),
Expanded(
child: Container(
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset("assets/images/SmartWatches/Apple-Watch-6.png", width: 70.0, height: 70.0),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 6", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
),
)
],
), ),
), )
), ],
], ),
), ),
), ),
Container( Expanded(
margin: EdgeInsets.only(top: 10.0), child: Container(
child: Row( margin: EdgeInsets.only(top: 15.0),
children: [ child: Row(
Expanded( children: [
child: Container( Image.asset("assets/images/SmartWatches/apple-watch-4.jpg", width: 70.0, height: 70.0),
margin: EdgeInsets.only(top: 15.0), Padding(
child: Row( padding: const EdgeInsets.only(left: 8.0, right: 8.0),
children: [ child: Container(
Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0), width: MediaQuery.of(context).size.width * 0.22,
Padding( child: Text("Apple Watch Series 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
),
)
],
), ),
), )
), ],
Expanded( ),
child: Container( ),
margin: EdgeInsets.only(top: 15.0), ),
child: Row( ],
children: [ ),
Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0), ),
Padding( Container(
padding: const EdgeInsets.only(left: 8.0, right: 8.0), margin: EdgeInsets.only(top: 10.0),
child: Container( child: Row(
width: MediaQuery.of(context).size.width * 0.22, children: [
child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), Expanded(
), child: Container(
) margin: EdgeInsets.only(top: 15.0),
], child: Row(
children: [
Image.asset("assets/images/SmartWatches/apple-watch-5.jpg", width: 70.0, height: 70.0),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 5", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
), ),
), )
), ],
], ),
), ),
), ),
Container( Expanded(
margin: EdgeInsets.fromLTRB(10.0, 30.0, 10.0, 10.0), child: Container(
child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset("assets/images/SmartWatches/Apple-Watch-6.png", width: 70.0, height: 70.0),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Apple Watch Series 6", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
),
)
],
),
),
), ),
Container( ],
margin: EdgeInsets.all(10.0), ),
child: Text(TranslationBase.of(context).syncInstructionsIntro2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), ),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Expanded(
child: Container(
margin: EdgeInsets.only(top: 15.0),
child: Row(
children: [
Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
),
)
],
),
),
), ),
InkWell( Expanded(
onTap: () { child: Container(
showInstructionsDialog(); margin: EdgeInsets.only(top: 15.0),
}, child: Row(
child: Padding( children: [
padding: const EdgeInsets.only(left: 10.0, right: 10.0), Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0),
child: Text(TranslationBase.of(context).watchInstructions, Padding(
style: TextStyle(color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.64, decoration: TextDecoration.underline)), padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Container(
width: MediaQuery.of(context).size.width * 0.22,
child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
),
)
],
),
), ),
), ),
], ],
), ),
), ),
SizedBox(height: 12),
Text(
TranslationBase.of(context).syncInstructionsIntro1,
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
fontWeight: FontWeight.w600,
color: Color(0xff575757),
),
),
SizedBox(height: 12),
Text(
TranslationBase.of(context).syncInstructionsIntro2,
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
fontWeight: FontWeight.w600,
color: Color(0xff575757),
),
),
SizedBox(height: 12),
InkWell(
onTap: () {
showInstructionsDialog();
},
child: Text(TranslationBase.of(context).watchInstructions,
style: TextStyle(color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.64, decoration: TextDecoration.underline)),
),
], ],
), ),
); );
@ -273,183 +281,200 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
_getGoogleWatchInstructions() { _getGoogleWatchInstructions() {
return SingleChildScrollView( return SingleChildScrollView(
child: Container( padding: EdgeInsets.all(21),
width: double.infinity, physics: BouncingScrollPhysics(),
margin: EdgeInsets.only(left: 16, top: 16, right: 16, bottom: 8), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Text(
Container( TranslationBase.of(context).supportedWatches,
child: Text(TranslationBase.of(context).supportedWatches, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600)), style: TextStyle(
fontSize: 20.0,
fontWeight: FontWeight.w600,
letterSpacing: -1.2,
color: Color(0xff2E303A),
), ),
Container( ),
child: Row( Container(
children: [ child: Row(
Expanded( children: [
child: Container( Expanded(
margin: EdgeInsets.only(top: 10.0), child: Container(
child: Row( margin: EdgeInsets.only(top: 10.0),
children: [ child: Row(
Image.asset("assets/images/SmartWatches/huawei-watch-2.png", width: 70.0, height: 70.0), children: [
Container( Image.asset("assets/images/SmartWatches/huawei-watch-2.png", width: 70.0, height: 70.0),
width: MediaQuery.of(context).size.width * 0.22, Container(
child: Text("Huawei Watch 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), width: MediaQuery.of(context).size.width * 0.22,
) child: Text("Huawei Watch 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
], )
), ],
), ),
), ),
Expanded( ),
child: Container( Expanded(
margin: EdgeInsets.only(top: 10.0), child: Container(
child: Row( margin: EdgeInsets.only(top: 10.0),
children: [ child: Row(
Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0), children: [
Container( Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0),
width: MediaQuery.of(context).size.width * 0.22, Container(
child: Text("Mobovi TicWatch E2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), width: MediaQuery.of(context).size.width * 0.22,
) child: Text("Mobovi TicWatch E2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
], )
), ],
), ),
), ),
], ),
), ],
), ),
Container( ),
margin: EdgeInsets.only(top: 10.0), Container(
child: Row( margin: EdgeInsets.only(top: 10.0),
children: [ child: Row(
Expanded( children: [
child: Container( Expanded(
margin: EdgeInsets.only(top: 15.0), child: Container(
child: Row( margin: EdgeInsets.only(top: 15.0),
children: [ child: Row(
Image.asset("assets/images/SmartWatches/huawei-watch-2-classic.png", width: 70.0, height: 70.0), children: [
Container( Image.asset("assets/images/SmartWatches/huawei-watch-2-classic.png", width: 70.0, height: 70.0),
width: MediaQuery.of(context).size.width * 0.22, Container(
child: Text("Huawei Watch", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), width: MediaQuery.of(context).size.width * 0.22,
) child: Text("Huawei Watch", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
], )
), ],
), ),
), ),
Expanded( ),
child: Container( Expanded(
margin: EdgeInsets.only(top: 15.0), child: Container(
child: Row( margin: EdgeInsets.only(top: 15.0),
children: [ child: Row(
Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0), children: [
Container( Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0),
width: MediaQuery.of(context).size.width * 0.22, Container(
child: Text("Fossil Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), width: MediaQuery.of(context).size.width * 0.22,
) child: Text("Fossil Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
], )
), ],
), ),
), ),
], ),
), ],
), ),
Container( ),
margin: EdgeInsets.only(top: 10.0), Container(
child: Row( margin: EdgeInsets.only(top: 10.0),
children: [ child: Row(
Expanded( children: [
child: Container( Expanded(
margin: EdgeInsets.only(top: 15.0), child: Container(
child: Row( margin: EdgeInsets.only(top: 15.0),
children: [ child: Row(
Image.asset("assets/images/SmartWatches/misfit-vapor-2.jpg", width: 70.0, height: 70.0), children: [
Container( Image.asset("assets/images/SmartWatches/misfit-vapor-2.jpg", width: 70.0, height: 70.0),
width: MediaQuery.of(context).size.width * 0.22, Container(
child: Text("MisFit Vapor 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), width: MediaQuery.of(context).size.width * 0.22,
) child: Text("MisFit Vapor 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
], )
), ],
), ),
), ),
Expanded( ),
child: Container( Expanded(
margin: EdgeInsets.only(top: 15.0), child: Container(
child: Row( margin: EdgeInsets.only(top: 15.0),
children: [ child: Row(
Image.asset("assets/images/SmartWatches/lg-watch-sport.jpg", width: 70.0, height: 70.0), children: [
Container( Image.asset("assets/images/SmartWatches/lg-watch-sport.jpg", width: 70.0, height: 70.0),
width: MediaQuery.of(context).size.width * 0.22, Container(
child: Text("LG Watch Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), width: MediaQuery.of(context).size.width * 0.22,
) child: Text("LG Watch Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
], )
), ],
), ),
), ),
], ),
), ],
), ),
Container( ),
margin: EdgeInsets.only(top: 10.0), Container(
child: Row( margin: EdgeInsets.only(top: 10.0),
children: [ child: Row(
Expanded( children: [
child: Container( Expanded(
margin: EdgeInsets.only(top: 15.0), child: Container(
child: Row( margin: EdgeInsets.only(top: 15.0),
children: [ child: Row(
Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0), children: [
Container( Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0),
width: MediaQuery.of(context).size.width * 0.22, Container(
child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), width: MediaQuery.of(context).size.width * 0.22,
) child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
], )
), ],
), ),
), ),
Expanded( ),
child: Container( Expanded(
margin: EdgeInsets.only(top: 15.0), child: Container(
child: Row( margin: EdgeInsets.only(top: 15.0),
children: [ child: Row(
Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0), children: [
Container( Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0),
width: MediaQuery.of(context).size.width * 0.22, Container(
child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), width: MediaQuery.of(context).size.width * 0.22,
) child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)),
], )
), ],
), ),
), ),
], ),
), ],
), ),
InkWell( ),
onTap: () { SizedBox(height: 12),
launch("https://wearos.google.com/#find-your-watch"); InkWell(
}, onTap: () {
child: Container( launch("https://wearos.google.com/#find-your-watch");
margin: EdgeInsets.only(top: 20.0), },
child: Text(TranslationBase.of(context).moreSupportedWatches, style: TextStyle(fontSize: 14.0, color: Colors.blue, decoration: TextDecoration.underline, letterSpacing: -0.36)), child: Text(
), TranslationBase.of(context).moreSupportedWatches,
style: TextStyle(fontSize: 14.0, color: Colors.blue, fontWeight: FontWeight.w600, decoration: TextDecoration.underline, letterSpacing: -0.56),
), ),
Container( ),
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), SizedBox(height: 12),
child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), Text(
TranslationBase.of(context).syncInstructionsIntro1,
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
fontWeight: FontWeight.w600,
color: Color(0xff575757),
), ),
Container( ),
margin: EdgeInsets.only(top: 10.0, bottom: 10.0), SizedBox(height: 12),
child: Text(TranslationBase.of(context).syncInstructionsIntro2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), Text(
TranslationBase.of(context).syncInstructionsIntro2,
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
fontWeight: FontWeight.w600,
color: Color(0xff575757),
), ),
InkWell( ),
onTap: () { SizedBox(height: 12),
showInstructionsDialog(); InkWell(
}, onTap: () {
child: Padding( showInstructionsDialog();
padding: const EdgeInsets.only(top: 10.0, bottom: 10.0), },
child: Text(TranslationBase.of(context).watchInstructions, child: Text(
style: TextStyle(color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.64, decoration: TextDecoration.underline)), TranslationBase.of(context).watchInstructions,
), style: TextStyle(color: CustomColors.accentColor, fontWeight: FontWeight.w600, letterSpacing: -0.64, decoration: TextDecoration.underline),
), ),
], ),
), ],
), ),
); );
} }
@ -470,69 +495,107 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
children: [ children: [
Container( Container(
width: 350.0, width: 350.0,
padding: EdgeInsets.all(21),
color: Colors.white, color: Colors.white,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Row(
width: MediaQuery.of(context).size.width, mainAxisAlignment: MainAxisAlignment.spaceBetween,
padding: EdgeInsets.all(20.0), children: [
child: Row( Text(
mainAxisAlignment: MainAxisAlignment.spaceBetween, TranslationBase.of(context).smartWatches,
children: [ style: TextStyle(fontSize: 18.0, color: Color(0xff2E303A), fontWeight: FontWeight.w600, letterSpacing: -1.2),
Text(TranslationBase.of(context).smartWatches, style: TextStyle(fontSize: 22.0, color: Colors.black, fontWeight: FontWeight.w600, letterSpacing: -0.64)), ),
IconButton( IconButton(
icon: Icon( icon: Icon(
Icons.close, Icons.close,
color: Colors.black, color: Color(0xff2E303A),
),
onPressed: () {
Navigator.pop(context);
},
), ),
], onPressed: () {
), Navigator.pop(context);
},
),
],
), ),
Container( Text(
margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 10.0), TranslationBase.of(context).syncInstructionsIntro3,
child: Text(TranslationBase.of(context).syncInstructionsIntro3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
color: Color(0xff575757),
),
), ),
SizedBox(height: 12),
Platform.isIOS Platform.isIOS
? Column( ? Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Text(
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 10.0), TranslationBase.of(context).iosInstructions1,
child: Text(TranslationBase.of(context).iosInstructions1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
color: Color(0xff575757),
),
), ),
Container( SizedBox(height: 12),
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 10.0), Text(
child: Text(TranslationBase.of(context).iosInstructions2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), TranslationBase.of(context).iosInstructions2,
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
color: Color(0xff575757),
),
), ),
Container( SizedBox(height: 12),
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 21.0), Text(
child: Text(TranslationBase.of(context).iosInstructions3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), TranslationBase.of(context).iosInstructions3,
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
color: Color(0xff575757),
),
), ),
], ],
) )
: Column( : Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Text(
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 10.0), TranslationBase.of(context).androidInstructions1,
child: Text(TranslationBase.of(context).androidInstructions1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
color: Color(0xff575757),
),
), ),
Container( SizedBox(height: 12),
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 10.0), Text(
child: Text(TranslationBase.of(context).androidInstructions2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), TranslationBase.of(context).androidInstructions2,
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
color: Color(0xff575757),
),
), ),
Container( SizedBox(height: 12),
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 10.0), Text(
child: Text(TranslationBase.of(context).androidInstructions3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), TranslationBase.of(context).androidInstructions3,
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
color: Color(0xff575757),
),
), ),
Container( SizedBox(height: 12),
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 10.0), Text(
child: Text(TranslationBase.of(context).androidInstructions4, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), TranslationBase.of(context).androidInstructions4,
style: TextStyle(
fontSize: 14.0,
letterSpacing: -0.56,
color: Color(0xff575757),
),
), ),
], ],
), ),

@ -136,7 +136,9 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
}); });
generateWeekData(); generateWeekData();
setState(() { setState(() {
weeklyStatsAvgValue = avgWeeklyStepsValue ~/ weeklyDataLength; if (avgWeeklyStepsValue != 0) {
weeklyStatsAvgValue = avgWeeklyStepsValue ~/ weeklyDataLength;
}
isWeeklyDataLoaded = true; isWeeklyDataLoaded = true;
}); });
}).catchError((err) { }).catchError((err) {
@ -163,7 +165,9 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
}); });
generateMonthData(); generateMonthData();
setState(() { setState(() {
monthlyStatsAvgValue = avgMonthlyStepsValue ~/ monthlyDataLength; if (avgMonthlyStepsValue != 0) {
monthlyStatsAvgValue = avgMonthlyStepsValue ~/ monthlyDataLength;
}
isMonthlyDataLoaded = true; isMonthlyDataLoaded = true;
}); });
}).catchError((err) { }).catchError((err) {
@ -190,7 +194,9 @@ class _StepsTrackerState extends State<StepsTracker> with SingleTickerProviderSt
}); });
generateYearData(); generateYearData();
setState(() { setState(() {
yearlyStatsAvgValue = avgYearlyStepsValue ~/ yearlyDataLength; if (avgYearlyStepsValue != 0) {
yearlyStatsAvgValue = avgYearlyStepsValue ~/ yearlyDataLength;
}
isYearlyDataLoaded = true; isYearlyDataLoaded = true;
}); });
}).catchError((err) { }).catchError((err) {

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'package:diplomaticquarterapp/models/SmartWatch/HealthData.dart'; import 'package:diplomaticquarterapp/models/SmartWatch/HealthData.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
@ -6,25 +8,18 @@ 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/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:fit_kit/fit_kit.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:intl/intl.dart'; import 'package:health/health.dart';
class syncHealthDataButton extends StatefulWidget { class syncHealthDataButton extends StatefulWidget {
double marginTop; syncHealthDataButton();
double hight;
double minWidth;
syncHealthDataButton({this.marginTop, this.hight, this.minWidth});
@override @override
_syncHealthDataButtonState createState() => _syncHealthDataButtonState(); _syncHealthDataButtonState createState() => _syncHealthDataButtonState();
} }
class _syncHealthDataButtonState extends State<syncHealthDataButton> { class _syncHealthDataButtonState extends State<syncHealthDataButton> {
List<DataType> dataTypes = List(); List<HealthDataPoint> _healthDataList = [];
List<healthData> Med_InsertTransactionsInputsList = new List(); List<healthData> Med_InsertTransactionsInputsList = new List();
List<healthData> Med_InsertTransactionsInputsList2 = new List(); List<healthData> Med_InsertTransactionsInputsList2 = new List();
@ -39,27 +34,12 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
@override @override
void initState() { void initState() {
dataTypes.add(DataType.DISTANCE);
dataTypes.add(DataType.STEP_COUNT);
dataTypes.add(DataType.HEART_RATE);
// dataTypes.add(DataType.SLEEP);
// dataTypes.add(DataType.ENERGY);
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return DefaultButton(TranslationBase.of(context).syncHealthData, () => readAll()).insideContainer;
color: Colors.white,
child: Padding(
padding: const EdgeInsets.all(20.0),
child: DefaultButton(TranslationBase.of(context).syncHealthData, () {
print("ReadAll");
readAll();
}),
),
);
} }
void readAll() async { void readAll() async {
@ -69,98 +49,43 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
Med_InsertTransactionsInputsList.clear(); Med_InsertTransactionsInputsList.clear();
var date; DateTime startDate = DateTime.now().subtract(new Duration(days: 30));
var differenceInHours;
String strDifferenceInHours;
var differenceInMinutes;
String strDifferenceInMinutes;
var today = DateTime.now();
var yearNum = DateFormat('y').format(today).toString();
var firstDayOfTheYear = DateTime.parse(yearNum + "-" + "01" + "-" + "01");
if (await FitKit.requestPermissions(dataTypes)) {
for (DataType type in dataTypes) {
final results = await FitKit.read(
type,
dateFrom: firstDayOfTheYear,
dateTo: DateTime.now(),
limit: 1000,
);
if (type == DataType.DISTANCE) {
MedCategoryID = 7;
} else if (type == DataType.STEP_COUNT) {
MedCategoryID = 6;
} else if (type == DataType.HEART_RATE) {
MedCategoryID = 3;
}
results.forEach((result) { HealthFactory health = HealthFactory();
// print("in forEach"); List<HealthDataType> types = [HealthDataType.STEPS, HealthDataType.HEART_RATE, Platform.isAndroid ? HealthDataType.DISTANCE_DELTA : HealthDataType.DISTANCE_WALKING_RUNNING];
date = result.dateTo;
if (result.value.runtimeType.toString() == "int") { await health.requestAuthorization(types);
value = double.parse(result.value.toString());
} else { try {
value = result.value; List<HealthDataPoint> healthData = await health.getHealthDataFromTypes(startDate, DateTime.now(), types);
} _healthDataList.addAll(healthData);
} catch (e) {
MedSubCategoryID = 0; print("Caught exception in getHealthDataFromTypes: $e");
if (MedCategoryID == 4) {
differenceInHours = null;
var sleepDate = result.dateFrom.toString().substring(0, 10);
DateTime dateFrom = result.dateFrom;
DateTime dateTo = result.dateTo;
differenceInMinutes = dateTo.difference(dateFrom).inMinutes;
differenceInMinutes > 59 ? differenceInHours = differenceInMinutes / 60 : differenceInMinutes = differenceInMinutes;
if (differenceInHours != null && differenceInHours != 0) {
differenceInHours = differenceInHours.toInt();
differenceInMinutes = differenceInMinutes % 60;
differenceInHours < 10 ? strDifferenceInHours = "0" + differenceInHours.toString() : strDifferenceInHours = differenceInHours.toString();
} else {
strDifferenceInHours = "00";
differenceInHours = 00;
}
differenceInMinutes < 10 ? strDifferenceInMinutes = "0" + differenceInMinutes.toString() : strDifferenceInMinutes = differenceInMinutes.toString();
sleepDate = DateTime.parse(sleepDate + " " + strDifferenceInHours + ":" + strDifferenceInMinutes + ":" + "00.00").toString();
String hours = sleepDate.substring(11, sleepDate.indexOf(":"));
print(hours);
String minutes = sleepDate.substring(sleepDate.indexOf(":") + 1, sleepDate.indexOf(":") + 3);
print(minutes);
if (value == 0 || value == 109) {
print("in Bed");
MedSubCategoryID = 1;
value = double.parse(hours + "." + minutes);
print("value");
print(value);
} else if (value == 1 || value == 110) {
print("Sleep");
MedSubCategoryID = 2;
value = double.parse(hours + "." + minutes);
print("value");
print(value);
}
}
date = DateUtil.convertDateToString(date);
Med_InsertTransactionsInputsList.add(healthData(MedCategoryID: MedCategoryID, MedSubCategoryID: MedSubCategoryID, MachineDate: date, Value: value, TransactionsListID: TransactionsListID++));
});
}
} }
_healthDataList = HealthFactory.removeDuplicates(_healthDataList);
_healthDataList.forEach((x) {
if (x.type == HealthDataType.STEPS) {
Med_InsertTransactionsInputsList.add(
healthData(MedCategoryID: 6, MedSubCategoryID: MedSubCategoryID, MachineDate: DateUtil.convertDateToString(x.dateFrom), Value: x.value, TransactionsListID: TransactionsListID++));
}
if (x.type == HealthDataType.HEART_RATE) {
Med_InsertTransactionsInputsList.add(
healthData(MedCategoryID: 3, MedSubCategoryID: MedSubCategoryID, MachineDate: DateUtil.convertDateToString(x.dateFrom), Value: x.value, TransactionsListID: TransactionsListID++));
}
if (x.type == HealthDataType.DISTANCE_DELTA || x.type == HealthDataType.DISTANCE_WALKING_RUNNING) {
Med_InsertTransactionsInputsList.add(
healthData(MedCategoryID: 7, MedSubCategoryID: MedSubCategoryID, MachineDate: DateUtil.convertDateToString(x.dateFrom), Value: x.value, TransactionsListID: TransactionsListID++));
}
});
getAllHealthDataLists(); getAllHealthDataLists();
} }
void getAllHealthDataLists() { void getAllHealthDataLists() {
var totalSteps = 0.0; var totalSteps = 0.0;
var totalDistance = 0.0; var totalDistance = 0.0;
// double totalCalories = 0.0 ;
double totalHeartRate = 0.0; double totalHeartRate = 0.0;
double avgTotalHeartRate = 0.0; double avgTotalHeartRate = 0.0;
var counter = 0; var counter = 0;
@ -190,14 +115,11 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
value.forEach((element) { value.forEach((element) {
if (element['MedCategoryID'] == 6) { if (element['MedCategoryID'] == 6) {
MedCategoryID = 6; MedCategoryID = 6;
totalSteps += element['Value']; totalSteps += element['Value'];
} else if (element['MedCategoryID'] == 7) { } else if (element['MedCategoryID'] == 7) {
MedCategoryID = 7; MedCategoryID = 7;
// to convert from meter to km
totalDistance += (element['Value'] * 0.001); totalDistance += (element['Value'] * 0.001);
} else if (element['MedCategoryID'] == 3) { } else if (element['MedCategoryID'] == 3) {
// print("HeartRate");
MedCategoryID = 3; MedCategoryID = 3;
counter++; counter++;
totalHeartRate += element['Value']; totalHeartRate += element['Value'];
@ -209,10 +131,6 @@ class _syncHealthDataButtonState extends State<syncHealthDataButton> {
Med_InsertTransactionsInputsList2.add(new healthData( Med_InsertTransactionsInputsList2.add(new healthData(
MedCategoryID: 4, MedSubCategoryID: element['MedSubCategoryID'], MachineDate: DateUtil.convertDateToString(date), Value: element['Value'], TransactionsListID: TransactionsListID++)); MedCategoryID: 4, MedSubCategoryID: element['MedSubCategoryID'], MachineDate: DateUtil.convertDateToString(date), Value: element['Value'], TransactionsListID: TransactionsListID++));
} }
// else if(element['MedCategoryID'] == 8){
//
// totalCalories += element['Value'] ;
// }
}); });
if (counter == 0) { if (counter == 0) {

@ -18,28 +18,25 @@ dynamic languageID;
class ClinicPackagesPage extends StatefulWidget { class ClinicPackagesPage extends StatefulWidget {
List<PackagesResponseModel> products; List<PackagesResponseModel> products;
ClinicPackagesPage({@required this.products}); ClinicPackagesPage({@required this.products});
@override @override
_ClinicPackagesPageState createState() => _ClinicPackagesPageState(); _ClinicPackagesPageState createState() => _ClinicPackagesPageState();
} }
class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayoutMixin<ClinicPackagesPage>{ class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayoutMixin<ClinicPackagesPage> {
AppScaffold appScaffold; AppScaffold appScaffold;
List<PackagesResponseModel> get _products => widget.products; List<PackagesResponseModel> get _products => widget.products;
PackagesViewModel viewModel; PackagesViewModel viewModel;
onProductCartClick(PackagesResponseModel product) async { onProductCartClick(PackagesResponseModel product) async {
if(viewModel.service.customer == null) if (viewModel.service.customer == null) viewModel.service.customer = await CreateCustomerDialogPage(context: context).show();
viewModel.service.customer = await CreateCustomerDialogPage(context: context).show();
if(viewModel.service.customer != null) { if (viewModel.service.customer != null) {
var request = AddProductToCartRequestModel(product_id: product.id, customer_id: viewModel.service.customer.id); var request = AddProductToCartRequestModel(product_id: product.id, customer_id: viewModel.service.customer.id);
await viewModel.service.addProductToCart(request, context: context).then((response){ await viewModel.service.addProductToCart(request, context: context).then((response) {
// appScaffold.appBar.badgeUpdater(viewModel.service.cartItemCount); // appScaffold.appBar.badgeUpdater(viewModel.service.cartItemCount);
}).catchError((error) { }).catchError((error) {
utils.Utils.showErrorToast(error); utils.Utils.showErrorToast(error);
@ -47,9 +44,8 @@ class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayo
} }
} }
@override @override
void afterFirstLayout(BuildContext context) async{ void afterFirstLayout(BuildContext context) async {
// appScaffold.appBar.badgeUpdater(viewModel.service.cartItemCount); // appScaffold.appBar.badgeUpdater(viewModel.service.cartItemCount);
} }
@ -58,13 +54,11 @@ class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayo
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<PackagesViewModel>( return BaseView<PackagesViewModel>(
allowAny: true, allowAny: true,
onModelReady: (model){ onModelReady: (model) {
viewModel = model; viewModel = model;
}, },
builder: (_, model, wi) => appScaffold = AppScaffold( builder: (_, model, wi) => appScaffold = AppScaffold(
@ -76,22 +70,25 @@ class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayo
isOfferPackages: true, isOfferPackages: true,
showOfferPackagesCart: true, showOfferPackagesCart: true,
isShowDecPage: false, isShowDecPage: false,
showNewAppBar: true,
showNewAppBarTitle: true,
body: Padding( body: Padding(
padding: const EdgeInsets.all(5), padding: const EdgeInsets.all(12),
child: StaggeredGridView.countBuilder( child: StaggeredGridView.countBuilder(
crossAxisCount:4, crossAxisCount: 4,
itemCount: _products.length, itemCount: _products.length,
itemBuilder: (BuildContext context, int index) => new Container( itemBuilder: (BuildContext context, int index) => new Container(
color: Colors.transparent, color: Colors.transparent,
child: PackagesItemCard( itemContentPadding: 10,itemModel: _products[index], onCartClick: onProductCartClick,) child: PackagesItemCard(
), itemContentPadding: 10,
itemModel: _products[index],
onCartClick: onProductCartClick,
)),
staggeredTileBuilder: (int index) => StaggeredTile.fit(2), staggeredTileBuilder: (int index) => StaggeredTile.fit(2),
mainAxisSpacing: 20, mainAxisSpacing: 20,
crossAxisSpacing: 10, crossAxisSpacing: 10,
) )),
),
), ),
); );
} }
} }

File diff suppressed because it is too large Load Diff

@ -16,7 +16,7 @@ class CompareList with ChangeNotifier {
); );
} else { } else {
for (int i = 0; i < _product.length; i++) { for (int i = 0; i < _product.length; i++) {
if (_product.length <= 4 && _product[i].id != data.id) { if (_product.length < 4 && _product[i].id != data.id) {
_product.add(data); _product.add(data);
AppToast.showSuccessToast(message:TranslationBase.of(context).addToCompareMsg AppToast.showSuccessToast(message:TranslationBase.of(context).addToCompareMsg
// 'You have added a product to the Compare list' // 'You have added a product to the Compare list'

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
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:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -113,6 +114,7 @@ class slideDetail extends StatefulWidget {
class _slideDetailState extends State<slideDetail> { class _slideDetailState extends State<slideDetail> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return ListView.builder( return ListView.builder(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemCount: widget.data.length, itemCount: widget.data.length,
@ -122,7 +124,7 @@ class _slideDetailState extends State<slideDetail> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Container( Container(
height: 750, height: 760,
width: 150, width: 150,
margin: EdgeInsets.symmetric(horizontal: 10.0), margin: EdgeInsets.symmetric(horizontal: 10.0),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -171,10 +173,10 @@ class _slideDetailState extends State<slideDetail> {
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child:Align(
alignment: Alignment.topLeft, alignment: Alignment.topLeft,
child: RichText( child: RichText(
text: languageID == "ar"? TextSpan( text: projectViewModel.isArabic ? TextSpan(
text: widget.data[index].namen, text: widget.data[index].namen,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -193,8 +195,9 @@ class _slideDetailState extends State<slideDetail> {
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
alignment: Alignment.topRight,
child: RichText( child: RichText(
text: TextSpan( text: TextSpan(
text: "SAR ${widget.data[index].price.toString()}", text: "SAR ${widget.data[index].price.toString()}",
@ -204,8 +207,20 @@ class _slideDetailState extends State<slideDetail> {
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
), ),
):
Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: "SAR ${widget.data[index].price.toString()}",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
),
), ),
), ),
),
Padding( Padding(
padding: EdgeInsets.only(top: 8.0), padding: EdgeInsets.only(top: 8.0),
child: Container( child: Container(
@ -216,58 +231,61 @@ class _slideDetailState extends State<slideDetail> {
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
alignment: Alignment.topRight,
child: RichText( child: RichText(
text: languageID == "ar"? TextSpan( text: TextSpan(
text: widget.data[index].specifications != null ? text: widget.data[index].specifications != null ?
widget.data[index].specifications[0].nameN : widget.data[index].specifications[0].nameN :"",
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
fontSize: 13), fontSize: 13),
) )
:TextSpan( ),
): Align(
alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ? text: widget.data[index].specifications != null ?
widget.data[index].specifications[0].name : widget.data[index].specifications[0].name :"",
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
fontSize: 13), fontSize: 13),
), )
), ),
), )
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
alignment: Alignment.topRight,
child: RichText( child: RichText(
text: languageID == "ar"? TextSpan( text:TextSpan(
text: widget.data[index].specifications != null ? text: widget.data[index].specifications != null ?
widget.data[index].specifications[0].defaultValuen : widget.data[index].specifications[0].defaultValuen:"",
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle( style: TextStyle(
color: Colors.black54, color: Colors.black54,
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
):TextSpan( )
),
):Align(
alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ? text: widget.data[index].specifications != null ?
widget.data[index].specifications[0].defaultValue : widget.data[index].specifications[0].defaultValue:"",
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle( style: TextStyle(
color: Colors.black54, color: Colors.black54,
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), )
), ),
), )
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 8.0), padding: EdgeInsets.only(top: 8.0),
@ -278,58 +296,62 @@ class _slideDetailState extends State<slideDetail> {
), ),
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
child: RichText( alignment: Alignment.topRight,
text: languageID == "ar"? TextSpan( child: RichText(
text: widget.data[index].specifications != null ? text: TextSpan(
widget.data[index].specifications[1].nameN : text: widget.data[index].specifications != null ?
// "No data", widget.data[index].specifications[1].nameN :"",
TranslationBase.of(context).no_data, style: TextStyle(
style: TextStyle( fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, color: Colors.black,
color: Colors.black, fontSize: 13),
fontSize: 13), )
):TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[1].name :
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
), ),
), ): Align(
), alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[1].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
)
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
child: RichText( alignment: Alignment.topRight,
text: languageID == "ar"? TextSpan( child: RichText(
text: widget.data[index].specifications != null ? text:TextSpan(
widget.data[index].specifications[1].defaultValuen : text: widget.data[index].specifications != null ?
// "No data", widget.data[index].specifications[1].defaultValuen:"",
TranslationBase.of(context).no_data, style: TextStyle(
style: TextStyle( color: Colors.black54,
color: Colors.black54, fontSize: 15,
fontSize: 15, fontWeight: FontWeight.bold),
fontWeight: FontWeight.bold), )
):TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[1].defaultValue :
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
), ),
), ):Align(
), alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[1].defaultValue:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
)
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 8.0), padding: EdgeInsets.only(top: 8.0),
@ -340,58 +362,62 @@ class _slideDetailState extends State<slideDetail> {
), ),
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
child: RichText( alignment: Alignment.topRight,
text: languageID == "ar"? TextSpan( child: RichText(
text: widget.data[index].specifications != null ? text: TextSpan(
widget.data[index].specifications[2].nameN : text: widget.data[index].specifications != null ?
// "No data", widget.data[index].specifications[2].nameN :"",
TranslationBase.of(context).no_data, style: TextStyle(
style: TextStyle( fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, color: Colors.black,
color: Colors.black, fontSize: 13),
fontSize: 13), )
):TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[2].name :
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
), ),
), ): Align(
), alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[2].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
)
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
child: RichText( alignment: Alignment.topRight,
text: languageID == "ar"? TextSpan( child: RichText(
text: widget.data[index].specifications != null ? text:TextSpan(
widget.data[index].specifications[2].defaultValuen : text: widget.data[index].specifications != null ?
// "No data", widget.data[index].specifications[2].defaultValuen:"",
TranslationBase.of(context).no_data, style: TextStyle(
style: TextStyle( color: Colors.black54,
color: Colors.black54, fontSize: 15,
fontSize: 15, fontWeight: FontWeight.bold),
fontWeight: FontWeight.bold), )
):TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[2].defaultValue :
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
), ),
), ):Align(
), alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[2].defaultValue:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
)
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 8.0), padding: EdgeInsets.only(top: 8.0),
@ -402,58 +428,62 @@ class _slideDetailState extends State<slideDetail> {
), ),
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
child: RichText( alignment: Alignment.topRight,
text: languageID == "ar"? TextSpan( child: RichText(
text: widget.data[index].specifications != null ? text: TextSpan(
widget.data[index].specifications[3].nameN : text: widget.data[index].specifications != null ?
// "No data", widget.data[index].specifications[3].nameN :"",
TranslationBase.of(context).no_data, style: TextStyle(
style: TextStyle( fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, color: Colors.black,
color: Colors.black, fontSize: 13),
fontSize: 13), )
):TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[3].name :
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
), ),
), ): Align(
), alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[3].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
)
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
child: RichText( alignment: Alignment.topRight,
text: languageID == "ar"? TextSpan( child: RichText(
text: widget.data[index].specifications != null ? text:TextSpan(
widget.data[index].specifications[3].defaultValuen : text: widget.data[index].specifications != null ?
// "No data", widget.data[index].specifications[3].defaultValuen:"",
TranslationBase.of(context).no_data, style: TextStyle(
style: TextStyle( color: Colors.black54,
color: Colors.black54, fontSize: 15,
fontSize: 15, fontWeight: FontWeight.bold),
fontWeight: FontWeight.bold), )
):TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[3].defaultValue :
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
), ),
), ):Align(
), alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[3].defaultValue:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
)
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 8.0), padding: EdgeInsets.only(top: 8.0),
@ -464,58 +494,62 @@ class _slideDetailState extends State<slideDetail> {
), ),
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
child: RichText( alignment: Alignment.topRight,
text: languageID == "ar"? TextSpan( child: RichText(
text: widget.data[index].specifications != null ? text: TextSpan(
widget.data[index].specifications[4].nameN : text: widget.data[index].specifications != null ?
// "No data", widget.data[index].specifications[4].nameN :"",
TranslationBase.of(context).no_data, style: TextStyle(
style: TextStyle( fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, color: Colors.black,
color: Colors.black, fontSize: 13),
fontSize: 13), )
):TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[4].name :
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
), ),
), ): Align(
), alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[4].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
)
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
child: RichText( alignment: Alignment.topRight,
text: languageID == "ar"? TextSpan( child: RichText(
text: widget.data[index].specifications != null ? text:TextSpan(
widget.data[index].specifications[4].defaultValuen : text: widget.data[index].specifications != null ?
// "No data", widget.data[index].specifications[4].defaultValuen:"",
TranslationBase.of(context).no_data, style: TextStyle(
style: TextStyle( color: Colors.black54,
color: Colors.black54, fontSize: 15,
fontSize: 15, fontWeight: FontWeight.bold),
fontWeight: FontWeight.bold), )
):TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[4].defaultValue :
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
), ),
), ):Align(
), alignment: Alignment.topLeft,
child: RichText(
text:TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[4].defaultValue:"",
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
)
),
)
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 8.0), padding: EdgeInsets.only(top: 8.0),
@ -526,67 +560,64 @@ class _slideDetailState extends State<slideDetail> {
), ),
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
child: RichText( alignment: Alignment.topRight,
text: languageID == "ar"? TextSpan( child: RichText(
text: widget.data[index].specifications != null ? text: TextSpan(
widget.data[index].specifications[5].nameN : text: widget.data[index].specifications != null ?
// "No data", widget.data[index].specifications[5].nameN :"",
TranslationBase.of(context).no_data, style: TextStyle(
style: TextStyle( fontWeight: FontWeight.bold,
fontWeight: FontWeight.bold, color: Colors.black,
color: Colors.black, fontSize: 13),
fontSize: 13), )
):TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[5].name :
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
), ),
), ): Align(
), alignment: Alignment.topLeft,
child: RichText(
text: TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[5].name :"",
style: TextStyle(
fontWeight: FontWeight.bold,
color: Colors.black,
fontSize: 13),
)
),
)
), ),
Container( Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
child: Align( child: projectViewModel.isArabic ?
alignment: Alignment.topLeft, Align(
child: RichText( alignment: Alignment.topRight,
text: languageID == "ar"? TextSpan( child: RichText(
text: widget.data[index].specifications != null ? text:TextSpan(
widget.data[index].specifications[5].defaultValuen : text: widget.data[index].specifications != null ?
// "No data", widget.data[index].specifications[5].defaultValuen:"",
TranslationBase.of(context).no_data, style: TextStyle(
style: TextStyle( color: Colors.black54,
color: Colors.black54, fontSize: 15,
fontSize: 15, fontWeight: FontWeight.bold),
fontWeight: FontWeight.bold), )
):TextSpan(
text: widget.data[index].specifications != null ?
widget.data[index].specifications[5].defaultValue :
// "No data",
TranslationBase.of(context).no_data,
style: TextStyle(
color: Colors.black54,
fontSize: 15,
fontWeight: FontWeight.bold),
), ),
), ):Align(
), alignment: Alignment.topLeft,
), child: RichText(
Padding( text:TextSpan(
padding: EdgeInsets.only(top: 8.0), text: widget.data[index].specifications != null ?
child: Container( widget.data[index].specifications[5].defaultValue:"",
height: 1.0, style: TextStyle(
width: 300.0, color: Colors.black54,
color: Colors.grey, fontSize: 15,
), fontWeight: FontWeight.bold),
)
),
)
), ),
], ],
), ),
), ),

@ -412,7 +412,7 @@ class _OrderBottomWidgetState extends State<OrderBottomWidget> {
if (widget.model.isCartItemsOutOfStock()) if (widget.model.isCartItemsOutOfStock())
{AppToast.showErrorToast(message: TranslationBase.of(context).outOfStockMsg)} {AppToast.showErrorToast(message: TranslationBase.of(context).outOfStockMsg)}
else else
{_navigateToAddressPage(widget.model.user.patientIdentificationNo)} {_navigateToAddressPage(projectProvider.user.patientIdentificationNo)}
} }
: null, : null,
child: new Text( child: new Text(

@ -1,9 +1,12 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/payment_bottom_widget.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/select_address_widget.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/select_address_widget.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/select_payment_option_widget.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/select_payment_option_widget.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductOrderPreviewItem.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/widgets/ProductOrderPreviewItem.dart';
import 'package:diplomaticquarterapp/theme/colors.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/in_app_browser/InAppBrowser.dart'; import 'package:diplomaticquarterapp/widgets/in_app_browser/InAppBrowser.dart';
@ -17,8 +20,11 @@ class OrderPreviewPage extends StatefulWidget {
final List<Addresses> addresses; final List<Addresses> addresses;
final OrderPreviewViewModel model; final OrderPreviewViewModel model;
OrderPreviewPage({this.addresses, this.model}); OrderPreviewPage({this.addresses, this.model});
@override @override
_OrderPreviewPageState createState() => _OrderPreviewPageState(); _OrderPreviewPageState createState() => _OrderPreviewPageState();
} }
@ -26,6 +32,10 @@ class OrderPreviewPage extends StatefulWidget {
class _OrderPreviewPageState extends State<OrderPreviewPage> { class _OrderPreviewPageState extends State<OrderPreviewPage> {
MyInAppBrowser browser; MyInAppBrowser browser;
bool isLoading = true; bool isLoading = true;
bool isChecked = false;
@override @override
void initState() { void initState() {
@ -40,6 +50,7 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
}); });
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context); final mediaQuery = MediaQuery.of(context);
@ -71,16 +82,99 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
height: 10, height: 10,
), ),
widget.model.paymentCheckoutData.lacumInformation != null widget.model.paymentCheckoutData.lacumInformation != null
? Container( ? AbsorbPointer(
child: Column( absorbing: true,
children: [ child: Stack(
LakumWidget(widget.model), children: [
SizedBox( Container(
height: 10, child: Column(
children: [
// LakumWidget(widget.model),
Container(
color: Colors.white,
padding: EdgeInsets.symmetric(vertical: 12, horizontal: 12),
child: Row(
children: [
Row(
children: [
SizedBox(
height: 24.0,
width: 24.0,
child: Checkbox(
activeColor: CustomColors.green,
value: isChecked,
onChanged: (bool value) {
setState(() {
isChecked = value;
print(isChecked);
if (value){
// isChecked;
PaymentBottomWidget.isChecked = true;
print(value);
}else{
PaymentBottomWidget.isChecked = false;
}
setState(() {
});
});
},
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text(
TranslationBase.of(context).useLakumPoints +
" (${widget.model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalance.toString() + " " + TranslationBase.of(context).points})",
style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.56)),
),
],
),
Expanded(
child: Container(
decoration: BoxDecoration(color: Color(0x99ffffff)),
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Container(
decoration: BoxDecoration(color: Color(0x99ffffff)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"${TranslationBase.of(context).availableBalance}",
fontSize: 12,
fontWeight: FontWeight.bold,
),
Text(
"${TranslationBase.of(context).sar + " " + widget.model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount.toString()}",
style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.56)
),
],
),
),
],
),
),
),
],
),
),
SizedBox(
height: 10,
),
],
),
), ),
], Container(
), height: MediaQuery.of(context).size.height * .10,
) color: Colors.white.withOpacity(0.6),
)
],
),
)
: Container(), : Container(),
Container( Container(
color: Colors.white, color: Colors.white,
@ -190,7 +284,49 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
indent: 0, indent: 0,
endIndent: 0, endIndent: 0,
), ),
isChecked ?
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
"${TranslationBase.of(context).lakum}",
fontSize: 14,
color: Colors.green,
fontWeight: FontWeight.w500,
),
Texts(
"- ${TranslationBase.of(context).sar} ${(widget.model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount).toStringAsFixed(2)}",
fontSize: 14,
color: Colors.green,
fontWeight: FontWeight.w500,
),
],
) : Container(),
isChecked ? const Divider(
color: Color(0xFFD6D6D6),
height: 20,
thickness: 1,
indent: 0,
endIndent: 0,
): Container(),
isChecked ? Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context).total,
fontSize: 14,
color: Colors.black,
fontWeight: FontWeight.bold,
),
Texts(
" ${TranslationBase.of(context).sar}""${(widget.model.cartResponse.totalAmount - widget.model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount).toStringAsFixed(2)}",
fontSize: 14,
color: Colors.black,
fontWeight: FontWeight.bold,
),
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Texts( Texts(
@ -200,7 +336,7 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
Texts( Texts(
"${TranslationBase.of(context).sar} ${(widget.model.cartResponse.totalAmount).toStringAsFixed(2)}", " ${TranslationBase.of(context).sar} ${(widget.model.cartResponse.totalAmount).toStringAsFixed(2)}",
fontSize: 14, fontSize: 14,
color: Colors.black, color: Colors.black,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -228,9 +364,12 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
child: PaymentBottomWidget(widget.model), child: PaymentBottomWidget(widget.model),
), ),
); );
} }
changeMainState() { changeMainState() {
setState(() {}); setState(() {});
} }
} }

@ -1,5 +1,8 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/cart-page/cart-order-preview.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.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';
@ -9,6 +12,7 @@ import 'package:provider/provider.dart';
class LakumWidget extends StatefulWidget { class LakumWidget extends StatefulWidget {
final OrderPreviewViewModel model; final OrderPreviewViewModel model;
LakumWidget(this.model); LakumWidget(this.model);
@override @override
@ -41,6 +45,15 @@ class _LakumWidgetState extends State<LakumWidget> {
setState(() { setState(() {
useLakumWidgets = value; useLakumWidgets = value;
print(useLakumWidgets); print(useLakumWidgets);
// if (value){
// // isChecked;
// OrderPreviewPage.isChecked = true;
// print(value);
// }else{
// OrderPreviewPage.isChecked = false;
// }
setState(() {
});
}); });
}, },
), ),
@ -150,6 +163,25 @@ class _LakumWidgetState extends State<LakumWidget> {
// ), // ),
), ),
), ),
// useLakumWidgets ?
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Texts(
// "${TranslationBase.of(context).lakum}",
// fontSize: 14,
// color: Colors.black,
// fontWeight: FontWeight.w500,
// ),
// Texts(
// "${TranslationBase.of(context).sar} ${(widget.model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalance).toStringAsFixed(2)}",
// fontSize: 14,
// color: Colors.black,
// fontWeight: FontWeight.w500,
// ),
// ],
// )
// :Container()
], ],
), ),
); );

@ -16,6 +16,7 @@ import 'package:provider/provider.dart';
class PaymentBottomWidget extends StatelessWidget { class PaymentBottomWidget extends StatelessWidget {
final OrderPreviewViewModel model; final OrderPreviewViewModel model;
static bool isChecked = true;
BuildContext context; BuildContext context;
MyInAppBrowser browser; MyInAppBrowser browser;
@ -42,6 +43,12 @@ class PaymentBottomWidget extends StatelessWidget {
margin: EdgeInsets.symmetric(horizontal: 0, vertical: 4), margin: EdgeInsets.symmetric(horizontal: 0, vertical: 4),
child: Row( child: Row(
children: [ children: [
isChecked ? Texts(
"${TranslationBase.of(context).sar} ${(model.cartResponse.totalAmount - model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount).toStringAsFixed(2)}",
fontSize: 14,
fontWeight: FontWeight.bold,
color: Color(0xff929295),
):
Texts( Texts(
"${TranslationBase.of(context).sar} ${(model.cartResponse.totalAmount).toStringAsFixed(2)}", "${TranslationBase.of(context).sar} ${(model.cartResponse.totalAmount).toStringAsFixed(2)}",
fontSize: 14, fontSize: 14,

@ -41,6 +41,9 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
isShowAppBar: true, isShowAppBar: true,
isPharmacy: true, isPharmacy: true,
isShowDecPage: false, isShowDecPage: false,
showHomeAppBarIcon: false,
isBottomBar: true,
showPharmacyCart: false,
backgroundColor: Colors.white, backgroundColor: Colors.white,
baseViewModel: model, baseViewModel: model,
body: Container( body: Container(
@ -105,7 +108,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
CrossAxisAlignment.end, CrossAxisAlignment.end,
children: [ children: [
Texts( Texts(
"0", "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalance}",
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.white, color: Colors.white,
@ -165,7 +168,7 @@ class _LacumTransferPageState extends State<LacumTransferPage> {
CrossAxisAlignment.end, CrossAxisAlignment.end,
children: [ children: [
Texts( Texts(
"0", "${model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount}",
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.white, color: Colors.white,

@ -44,6 +44,8 @@ class LakumMainPage extends StatelessWidget {
isPharmacy: true, isPharmacy: true,
showPharmacyCart: false, showPharmacyCart: false,
isShowDecPage: false, isShowDecPage: false,
showHomeAppBarIcon: false,
isBottomBar: true,
backgroundColor: Colors.white, backgroundColor: Colors.white,
baseViewModel: model, baseViewModel: model,
appBarIcons: _buildAppBarICons(context, model), appBarIcons: _buildAppBarICons(context, model),
@ -354,12 +356,12 @@ class LakumHomeButtons extends StatelessWidget {
children: [ children: [
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { // onTap: () {
print("Account activate click"); // print("Account activate click");
Navigator.push( // Navigator.push(
context, FadePage(page: LakumActivationVidaPage())) // context, FadePage(page: LakumActivationVidaPage()))
.then((result) => {model.getLacumGroupData()}); // .then((result) => {model.getLacumGroupData()});
}, // },
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 8), padding: EdgeInsets.symmetric(horizontal: 8),
decoration: BoxDecoration( decoration: BoxDecoration(

@ -66,7 +66,7 @@ class _LakumPointsYearPageState extends State<LakumPointsYearPage> {
(index) => LakumPointTableRowWidget( (index) => LakumPointTableRowWidget(
false, false,
widget.pointsAmountPerYear[widget.selectedIndexYear] widget.pointsAmountPerYear[widget.selectedIndexYear]
.pointsAmountPerMonth[index].month, .pointsAmountPerMonth[index].month.toString(),
widget.pointsAmountPerYear[widget.selectedIndexYear] widget.pointsAmountPerYear[widget.selectedIndexYear]
.pointsAmountPerMonth[index].pointsPerMonth, .pointsAmountPerMonth[index].pointsPerMonth,
widget.pointsAmountPerYear[widget.selectedIndexYear] widget.pointsAmountPerYear[widget.selectedIndexYear]

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

@ -1,13 +1,16 @@
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/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:map_launcher/map_launcher.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class AvailabilityInfo extends StatelessWidget { class AvailabilityInfo extends StatelessWidget {
final ProductDetailViewModel previousModel; final ProductDetailViewModel previousModel;
const AvailabilityInfo({Key key, this.previousModel}) : super(key: key); final InAppBrowser browser = new InAppBrowser();
AvailabilityInfo({Key key, this.previousModel}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -20,8 +23,8 @@ class AvailabilityInfo extends StatelessWidget {
), ),
) )
: Container( : Container(
margin: EdgeInsets.only(bottom: 40), margin: EdgeInsets.only(bottom: 40),
child: ListView.builder( child: ListView.builder(
physics: ScrollPhysics(), physics: ScrollPhysics(),
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
@ -53,8 +56,12 @@ class AvailabilityInfo extends StatelessWidget {
child: IconButton( child: IconButton(
icon: Icon(Icons.location_on), icon: Icon(Icons.location_on),
color: Colors.red, color: Colors.red,
onPressed: () { onPressed: () async {
MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription); await MapLauncher.showMarker(
mapType: MapType.google,
coords: Coords(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude)),
title: previousModel.productLocationService[index].locationDescription,
);
}, },
), ),
), ),
@ -76,7 +83,7 @@ class AvailabilityInfo extends StatelessWidget {
); );
}, },
), ),
); );
} }
convertCityName(txt) { convertCityName(txt) {

@ -45,10 +45,21 @@ class FooterWidget extends StatefulWidget {
class _FooterWidgetState extends State<FooterWidget> { class _FooterWidgetState extends State<FooterWidget> {
double quantityUI = 80; double quantityUI = 80;
bool showUI = false; bool showUI = false;
static final GlobalKey<FormState> _key = GlobalKey<FormState>();
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>(); locator<AuthenticatedUserObject>();
AppSharedPreferences sharedPref = new AppSharedPreferences(); AppSharedPreferences sharedPref = new AppSharedPreferences();
@override
void initState() {
super.initState();
if (!isBuyNowDisable() || !isAddToCartDisable()) {
quantityUI = 160;
showUI = true;
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -57,14 +68,25 @@ class _FooterWidgetState extends State<FooterWidget> {
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(0.0), Radius.circular(0.0),
), ),
border: Border.all(color: Color(0xFF707070), width: 0), boxShadow: [
BoxShadow(
color: Color(0xFFCCCCCC),
spreadRadius: 0,
blurRadius: 4,
offset: Offset(2, 2), // changes position of shadow
),
],
// border: Border.all(color: Color(0xFF707070), width: 0),
), ),
width: double.infinity, width: double.infinity,
height: quantityUI, height: quantityUI,
child: Column( child: Column(
children: [ children: [
showUI !showUI
? Container( ? Container(
height: 10,
)
: Container(
width: double.infinity, width: double.infinity,
height: 100, height: 100,
color: Colors.white, color: Colors.white,
@ -81,11 +103,10 @@ class _FooterWidgetState extends State<FooterWidget> {
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Texts( child: Texts(
TranslationBase.of(context).productQuantity, TranslationBase.of(context).productQuantity,
fontSize: 15, fontSize: 15,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Color(0xFF575757) color: Color(0xFF575757)),
),
), ),
InkWell( InkWell(
child: Icon(Icons.close, color: Colors.black), child: Icon(Icons.close, color: Colors.black),
@ -119,8 +140,11 @@ class _FooterWidgetState extends State<FooterWidget> {
color: Colors.white, color: Colors.white,
), ),
child: TextField( child: TextField(
decoration: InputDecoration( key: _key,
labelText: ' Quantity # '), keyboardType: TextInputType.number,
textAlign: TextAlign.center,
decoration:
InputDecoration(hintText: ' Quantity # '),
onChanged: (text) { onChanged: (text) {
if (int.tryParse(text) == null) { if (int.tryParse(text) == null) {
text = ''; text = '';
@ -144,9 +168,6 @@ class _FooterWidgetState extends State<FooterWidget> {
], ],
), ),
), ),
)
: Container(
height: 10,
), ),
Container( Container(
height: 58, height: 58,
@ -219,12 +240,11 @@ class _FooterWidgetState extends State<FooterWidget> {
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
margin: EdgeInsets.symmetric(vertical: 4.0),
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).addToCart, label: TranslationBase.of(context).addToCart,
disabled: (!widget.isAvailable && widget.quantity > 0) || disabled: isAddToCartDisable(),
widget.quantity > widget.quantityLimit || fontSize: 15,
widget.item.isRx,
fontSize: 16,
onTap: () async { onTap: () async {
if (!authenticatedUserObject.isLogin) { if (!authenticatedUserObject.isLogin) {
login(); login();
@ -235,8 +255,10 @@ class _FooterWidgetState extends State<FooterWidget> {
model: widget.model); model: widget.model);
}, },
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
borderColor: Color(0xFF4CAF50).withOpacity(0.7),
borderRadius: 6, borderRadius: 6,
disableColor: Color(0xFFD6D6D6),
textColor:
isAddToCartDisable() ? Color(0xFFACACAC) : Colors.white,
color: Color(0xFF535353), color: Color(0xFF535353),
), ),
), ),
@ -245,12 +267,11 @@ class _FooterWidgetState extends State<FooterWidget> {
), ),
Container( Container(
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
margin: EdgeInsets.symmetric(vertical: 4.0),
child: SecondaryButton( child: SecondaryButton(
label: TranslationBase.of(context).buyNow, label: TranslationBase.of(context).buyNow,
fontSize: 16, fontSize: 15,
disabled: (!widget.isAvailable && widget.quantity > 0) || disabled: isBuyNowDisable(),
(widget.quantity > widget.quantityLimit) ||
widget.item.isRx,
onTap: () async { onTap: () async {
if (!authenticatedUserObject.isLogin) { if (!authenticatedUserObject.isLogin) {
login(); login();
@ -261,15 +282,12 @@ class _FooterWidgetState extends State<FooterWidget> {
model: widget.model); model: widget.model);
} }
}, },
textColor:
isBuyNowDisable() ? Color(0xFFACACAC) : Colors.white,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
borderColor: Colors.grey[800].withOpacity(0.7),
borderRadius: 6, borderRadius: 6,
disableColor: Colors.grey[700], disableColor: Color(0xFFD6D6D6),
color: !widget.isAvailable && widget.quantity > 0 || color: Color(0xFF5AB145),
widget.quantity > widget.quantityLimit ||
widget.item.isRx
? Color(0xFF535353).withOpacity(0.7)
: Color(0xFF5AB145),
), ),
), ),
], ],
@ -280,6 +298,18 @@ class _FooterWidgetState extends State<FooterWidget> {
); );
} }
bool isBuyNowDisable() {
return (!widget.isAvailable && widget.quantity > 0) ||
(widget.quantity > widget.quantityLimit) ||
widget.item.isRx;
}
bool isAddToCartDisable() {
return (!widget.isAvailable && widget.quantity > 0) ||
widget.quantity > widget.quantityLimit ||
widget.item.isRx;
}
void setUserValues(value) async { void setUserValues(value) async {
if (value != null) sharedPref.setObject(IMEI_USER_DATA, value); if (value != null) sharedPref.setObject(IMEI_USER_DATA, value);
} }

@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.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.dart'; import 'package:diplomaticquarterapp/uitl/utils.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/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -133,27 +132,32 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
), ),
), ),
), ),
if(model.isStockAvailable!= null && !model.isStockAvailable) if (model.isStockAvailable != null && !model.isStockAvailable)
Container( Container(
height: MediaQuery.of(context).size.height * .40, height: MediaQuery.of(context).size.height * .40,
color: Colors.white.withOpacity(0.6), color: Colors.white.withOpacity(0.6),
// child: AppText("Out of Stock"), // child: AppText("Out of Stock"),
), ),
if(model.isStockAvailable!= null && !model.isStockAvailable) if (model.isStockAvailable != null && !model.isStockAvailable)
Positioned( Positioned(
// bottom: 10, // bottom: 10,
top: MediaQuery.of(context).size.height *.088, top: MediaQuery.of(context).size.height * .088,
left: MediaQuery.of(context).size.width *.32, left: MediaQuery.of(context).size.width * .32,
child: Center( child: Center(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * .40, height: MediaQuery.of(context).size.height * .40,
// color: Colors.white.withOpacity(0.75), // color: Colors.white.withOpacity(0.75),
child: RotationTransition( child: RotationTransition(
turns: new AlwaysStoppedAnimation(310 / 360), turns: new AlwaysStoppedAnimation(310 / 360),
child: AppText(TranslationBase.of(context).productOutOfStock ,color:Color(0xFF000000).withOpacity(0.19),fontSize: projectViewModel.isArabic?40: 50, fontWeight: FontWeight.bold ,)), child: AppText(
TranslationBase.of(context).productOutOfStock,
color: Color(0xFF000000).withOpacity(0.19),
fontSize: projectViewModel.isArabic ? 40 : 50,
fontWeight: FontWeight.bold,
)),
),
), ),
), ),
),
], ],
), ),
if (widget.product.discountDescription != null) DiscountDescription(product: widget.product) if (widget.product.discountDescription != null) DiscountDescription(product: widget.product)
@ -233,7 +237,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
}, },
child: Text( child: Text(
TranslationBase.of(context).details, TranslationBase.of(context).details,
style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.84), style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14, letterSpacing: -0.84),
), ),
color: Colors.white, color: Colors.white,
), ),
@ -264,7 +268,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
}, },
child: Text( child: Text(
TranslationBase.of(context).reviews, TranslationBase.of(context).reviews,
style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.84), style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14, letterSpacing: -0.84),
), ),
color: Colors.white, color: Colors.white,
), ),
@ -279,7 +283,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
Column( Column(
children: [ children: [
FlatButton( FlatButton(
onPressed: model.isStockAvailable !=null && model.isStockAvailable onPressed: model.isStockAvailable != null && model.isStockAvailable
? () async { ? () async {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await model.getProductLocationData(widget.product.sku); await model.getProductLocationData(widget.product.sku);
@ -294,7 +298,7 @@ class __ProductDetailPageState extends State<ProductDetailPage> {
: null, : null,
child: Text( child: Text(
TranslationBase.of(context).availability, TranslationBase.of(context).availability,
style: TextStyle( fontWeight: FontWeight.w600, fontSize: 14, letterSpacing:-0.84), style: TextStyle(fontWeight: FontWeight.w600, fontSize: 14, letterSpacing: -0.84),
), ),
color: Colors.white, color: Colors.white,
), ),

@ -126,15 +126,45 @@ class _ProductNameAndPriceState extends State<ProductNameAndPrice> {
widget.stockAvailability != null && widget.stockAvailability != null &&
!widget.isStockAvailable && !widget.isStockAvailable &&
widget.customerId != null widget.customerId != null
? IconButton( ? Container(
iconSize: 25, child: Row(
icon: Icon(Icons.notifications_active), children: [
color: new Color(0xff2E303A), IconButton(
onPressed: () { iconSize: 25,
widget.notifyMeWhenAvailable( icon: Icon(Icons.notifications_active),
context, widget.item.id); color: new Color(0xff2E303A),
}, onPressed: () {
) widget.notifyMeWhenAvailable(
context, widget.item.id);
},
),
IconButton(
icon: Icon(!widget.isInWishList
? Icons.favorite_border
: Icons.favorite),
color: !widget.isInWishList
? Color(0xff2E303A)
: Color(0xffD02127),
onPressed: () async {
{
if (widget.customerId != null) {
if (!widget.isInWishList) {
await widget
.addToWishlistFunction(widget.item.id);
} else {
await widget.deleteFromWishlistFunction(
widget.item.id);
}
} else {
return;
}
setState(() {});
}
},
)
],
),
)
: IconButton( : IconButton(
icon: Icon(!widget.isInWishList icon: Icon(!widget.isInWishList
? Icons.favorite_border ? Icons.favorite_border

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; 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/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart'; import 'package:rating_bar/rating_bar.dart';
class ReviewsInfo extends StatelessWidget { class ReviewsInfo extends StatelessWidget {
@ -13,6 +15,7 @@ class ReviewsInfo extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return previousModel.productDetailService.length != 0 && return previousModel.productDetailService.length != 0 &&
previousModel.productDetailService[0].reviews.length != 0 previousModel.productDetailService[0].reviews.length != 0
? ListView.builder( ? ListView.builder(
@ -48,18 +51,36 @@ class ReviewsInfo extends StatelessWidget {
), ),
), ),
Container( Container(
margin: EdgeInsets.only(left: 210), // margin: EdgeInsets.only(left: 210),
child: RatingBar.readOnly( child: projectViewModel.isArabic?
initialRating: previousModel Align(
.productDetailService[0].reviews[index].rating alignment: Alignment.topLeft,
.toDouble(), child: RatingBar.readOnly(
size: 15.0, initialRating: previousModel
filledColor: Colors.yellow[700], .productDetailService[0].reviews[index].rating
emptyColor: Colors.grey[500], .toDouble(),
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,
),
): Align(
alignment: Alignment.topRight,
child: RatingBar.readOnly(
initialRating: previousModel
.productDetailService[0].reviews[index].rating
.toDouble(),
size: 15.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
), ),
), ),
], ],
@ -68,11 +89,14 @@ class ReviewsInfo extends StatelessWidget {
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( Padding(
child: Text( padding: const EdgeInsets.all(8.0),
previousModel child: Container(
.productDetailService[0].reviews[index].reviewText, child: Text(
style: TextStyle(fontSize: 20), previousModel
.productDetailService[0].reviews[index].reviewText,
style: TextStyle(fontSize: 20),
),
), ),
), ),
SizedBox( SizedBox(

@ -54,26 +54,12 @@ class _SearchBrandsPageState extends State<SearchBrandsPage> {
fontSize: 19.0, fontSize: 19.0,
prefixIcon: Icon(Icons.search), prefixIcon: Icon(Icons.search),
inputAction: TextInputAction.search, inputAction: TextInputAction.search,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.allow(RegExp(r'([A-Za-z0-9 a space])')
// ("[\u0621-\u064a-\ ]")
)
],
validator: (value) {
RegExp regExp = RegExp(r'([A-Za-z0-9 a space])');
if (value.isEmpty) {
TranslationBase.of(context).pleaseEnterProductName;
}else if (!regExp.hasMatch(value)){
AppToast.showErrorToast(message: TranslationBase.of(context).noArabicLetters);
}
return null;
},
onSaved: (value) { onSaved: (value) {
//searchMedicine(model, context); //searchMedicine(model, context);
}, },
onSubmit: (value) { onSubmit: (value) {
searchMedicine(model, context); searchMedicine(model, context);
msg = TranslationBase.of(context).noResultFound; msg = TranslationBase.of(context).noSearchResultFound;
}, },
controller: textController, controller: textController,
// validator: (value) { // validator: (value) {

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

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

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

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

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

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

@ -74,7 +74,7 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
this.context = context; this.context = context;
return BaseView<OrderModelViewModel>( return BaseView<OrderModelViewModel>(
onModelReady: (model) { onModelReady: (model) {
model.getOrderDetails(widget.orderModel.id).then((value) { model.getOrderDetails(widget.orderModel.id, widget.orderModel.orderGuid).then((value) {
setState(() { setState(() {
isActiveDelivery = (value.orderStatusId == 995 && (value.driverID != null && value.driverID.isNotEmpty)); isActiveDelivery = (value.orderStatusId == 995 && (value.driverID != null && value.driverID.isNotEmpty));
}); });
@ -533,10 +533,6 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
model.orderListModel[0].orderStatusId == 10 model.orderListModel[0].orderStatusId == 10
? InkWell( ? InkWell(
onTap: () { onTap: () {
print(widget.orderModel.toString());
print(model.orderListModel.toString());
print("calc = ${5.9 * 3}");
// TODO MOSA
openPayment(model.orderListModel[0], model.user); openPayment(model.orderListModel[0], model.user);
}, },
child: Container( child: Container(
@ -672,11 +668,6 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
} }
} }
/***
*
* Online payment methods
*/
openPayment( openPayment(
OrderDetailModel order, OrderDetailModel order,
AuthenticatedUser authenticatedUser, AuthenticatedUser authenticatedUser,
@ -715,7 +706,7 @@ class _OrderDetailsPageState extends State<OrderDetailsPage> {
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); Navigator.pop(context);
} else { } else {
AppToast.showErrorToast(message: "Transaction Failed!\Your transaction is field to some reason please try again or contact to the administration"); AppToast.showErrorToast(message: "Transaction Failed!\Your transaction is field to some reason please try again or contact to the administration\فشلت العملية حاول مره اخرى");
} }
} }
} }

@ -34,6 +34,8 @@ class _ProductReviewPageState extends State<ProductReviewPage> {
appBarTitle: TranslationBase.of(context).writeReview, appBarTitle: TranslationBase.of(context).writeReview,
isShowAppBar: true, isShowAppBar: true,
isPharmacy: true, isPharmacy: true,
showPharmacyCart: false,
showHomeAppBarIcon: false,
body: Container( body: Container(
color: Colors.white, color: Colors.white,
child: !finishReview ? SingleChildScrollView( child: !finishReview ? SingleChildScrollView(

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.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/viewModels/pharmacyModule/OrderPreviewViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/OrderPreviewViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/PharmacyAddressesViewModel.dart';
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/pages/pharmacies/screens/payment-method-select-page.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/payment-method-select-page.dart';
import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/AddAddress.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/AddAddress.dart';
@ -15,6 +16,7 @@ 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';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
///TODO Elham* split this to tow files ///TODO Elham* split this to tow files
class PharmacyAddressesPage extends StatefulWidget { class PharmacyAddressesPage extends StatefulWidget {
@ -44,6 +46,7 @@ class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context); final mediaQuery = MediaQuery.of(context);
final height = mediaQuery.size.height - 60 - mediaQuery.padding.top; final height = mediaQuery.size.height - 60 - mediaQuery.padding.top;
ProjectViewModel projectProvider = Provider.of(context);
return BaseView<PharmacyAddressesViewModel>( return BaseView<PharmacyAddressesViewModel>(
onModelReady: (model) => model.getAddressesList(), onModelReady: (model) => model.getAddressesList(),
@ -127,7 +130,7 @@ class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await widget.orderPreviewViewModel.getInformationsByAddress(widget.orderPreviewViewModel.user.patientIdentificationNo); await widget.orderPreviewViewModel.getInformationsByAddress(projectProvider.user.patientIdentificationNo);
if (widget.orderPreviewViewModel.error == "") { if (widget.orderPreviewViewModel.error == "") {
await widget.orderPreviewViewModel.getShoppingCart(); await widget.orderPreviewViewModel.getShoppingCart();
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -175,7 +178,7 @@ class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
} }
} }
class AddressItemWidget extends StatelessWidget { class AddressItemWidget extends StatefulWidget {
final PharmacyAddressesViewModel model; final PharmacyAddressesViewModel model;
final AddressInfo address; final AddressInfo address;
final Function selectAddress; final Function selectAddress;
@ -184,6 +187,11 @@ class AddressItemWidget extends StatelessWidget {
AddressItemWidget(this.model, this.address, this.selectAddress, this.isSelected, this.onTabEditAddress); AddressItemWidget(this.model, this.address, this.selectAddress, this.isSelected, this.onTabEditAddress);
@override
_AddressItemWidgetState createState() => _AddressItemWidgetState();
}
class _AddressItemWidgetState extends State<AddressItemWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -199,14 +207,14 @@ class AddressItemWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
InkWell( InkWell(
onTap: selectAddress, onTap: widget.selectAddress,
child: Container( child: Container(
margin: EdgeInsets.only(left: 16, right: 16), margin: EdgeInsets.only(left: 16, right: 16),
child: Padding( child: Padding(
padding: const EdgeInsets.all(5.0), padding: const EdgeInsets.all(5.0),
child: Container( child: Container(
decoration: new BoxDecoration( decoration: new BoxDecoration(
color: !isSelected ? Colors.white : Colors.green, color: !widget.isSelected ? Colors.white : Colors.green,
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all(color: Colors.grey, style: BorderStyle.solid, width: 1.0), border: Border.all(color: Colors.grey, style: BorderStyle.solid, width: 1.0),
), ),
@ -214,7 +222,7 @@ class AddressItemWidget extends StatelessWidget {
padding: const EdgeInsets.all(0.0), padding: const EdgeInsets.all(0.0),
child: Icon( child: Icon(
Icons.check, Icons.check,
color: isSelected ? Colors.white : Colors.transparent, color: widget.isSelected ? Colors.white : Colors.transparent,
size: 25, size: 25,
), ),
), ),
@ -234,7 +242,7 @@ class AddressItemWidget extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.symmetric(vertical: 0), padding: const EdgeInsets.symmetric(vertical: 0),
child: Texts( child: Texts(
"${address.firstName} ${address.lastName}", "${widget.address.firstName} ${widget.address.lastName}",
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.black, color: Colors.black,
@ -243,7 +251,7 @@ class AddressItemWidget extends StatelessWidget {
Padding( Padding(
padding: const EdgeInsets.symmetric(vertical: 4), padding: const EdgeInsets.symmetric(vertical: 4),
child: Texts( child: Texts(
"${address.address1} ${address.address2} ${address.address2},, ${address.city}, ${address.country} ${address.zipPostalCode}", "${widget.address.address1} ${widget.address.address2} ${widget.address.address2},, ${widget.address.city}, ${widget.address.country} ${widget.address.zipPostalCode}",
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Colors.grey.shade500, color: Colors.grey.shade500,
@ -260,7 +268,7 @@ class AddressItemWidget extends StatelessWidget {
), ),
), ),
Texts( Texts(
"${address.phoneNumber}", "${widget.address.phoneNumber}",
fontSize: 14, fontSize: 14,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.grey, color: Colors.grey,
@ -281,7 +289,7 @@ class AddressItemWidget extends StatelessWidget {
borderColor: Colors.transparent, borderColor: Colors.transparent,
textColor: Color(0x990000FF), textColor: Color(0x990000FF),
handler: () { handler: () {
onTabEditAddress(address); widget.onTabEditAddress(widget.address);
}, },
icon: Icon( icon: Icon(
Icons.edit, Icons.edit,
@ -306,19 +314,25 @@ class AddressItemWidget extends StatelessWidget {
textColor: Color(0x99FF0000), textColor: Color(0x99FF0000),
handler: () { handler: () {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
context: context, // context: context,
title: "Are you sure want to delete", title: TranslationBase.of(context).deleteAddress,
confirmMessage: "${address.address1} ${address.address2}", //"Are you sure want to delete",
confirmMessage: "${widget.address.address1} ${widget.address.address2}",
okText: TranslationBase.of(context).delete, okText: TranslationBase.of(context).delete,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => { okFunction: () => {
model.deleteAddresses(address).then((_) { widget.model.deleteAddresses(widget.address).then((_) {
ConfirmDialog.closeAlertDialog(context); ConfirmDialog.closeAlertDialog(context);
AppToast.showErrorToast(message: "Address has been deleted"); AppToast.showErrorToast(message: TranslationBase.of(context).deletedAddress,
// "Address has been deleted"
);
}) })
}, },
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
setState(() {
widget.model.deleteAddresses(widget.address);
});
}, },
icon: Icon( icon: Icon(
Icons.delete, Icons.delete,

@ -0,0 +1,258 @@
import 'dart:io' show Platform;
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:map_launcher/map_launcher.dart';
import 'dart:io' show Platform;
class pharmacyContactsPage extends StatefulWidget {
@override
_pharmacyContactsPageState createState() => _pharmacyContactsPageState();
}
class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
@override
Widget build(BuildContext context) {
final latitude = "24.704016";
final longitude = "46.676691";
final phone = "+966112833400";
final whatsApp = "+966558434444";
final whatappURL_android = "whatsapp://send?phone=" + whatsApp;
final whatappURL_ios = "https://wa.me/$whatsApp";
final locationDescription = "Main Pharmacy OLAYA";
return AppScaffold(
appBarTitle: TranslationBase.of(context).contactUs,
isShowAppBar: true,
isShowDecPage: false,
isPharmacy: true,
showPharmacyCart: false,
showHomeAppBarIcon: false,
isMainPharmacyPages: true,
isBottomBar: true,
body: Column(
children: [
Card(
elevation: 2,
shape: RoundedRectangleBorder(
side: BorderSide(color: Colors.grey[300], width: 2),
borderRadius: BorderRadius.circular(10),
),
margin: EdgeInsets.symmetric(
horizontal: 8,
vertical: 8,
),
child: Container(
margin: EdgeInsets.all(10),
padding: EdgeInsets.fromLTRB(5, 15, 5, 15),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(15),
),
),
child: Column(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child: Text(TranslationBase.of(context).contactUsTime,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
),
),
SizedBox(
height: 35,
),
Row(
children: <Widget>[
InkWell(
onTap: () {
launch("tel://" + phone);
},
child: SvgPicture.asset(
'assets/images/pharmacy/call.svg',
width: 20,
height: 20,
),
),
SizedBox(
width: 20,
),
Text(TranslationBase.of(context).phone,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
SizedBox(
width: 30,
),
Text("+966 " + " -11- 2833400",
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
],
),
SizedBox(
height: 30,
),
Row(
children: <Widget>[
InkWell(
onTap: () {
// launch('whatsapp://send?phone='+whatsApp);
openWhatsApp();
},
child: SvgPicture.asset(
'assets/images/pharmacy/whatsapp.svg',
width: 20,
height: 20,
),
),
SizedBox(
width: 20,
),
Text(TranslationBase.of(context).whatsApp,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
SizedBox(
width: 30,
),
Text("+966 " + " 558434444",
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
],
),
SizedBox(
height: 30,
),
Padding(
padding: const EdgeInsets.all(5.0),
child: Row(
children: <Widget>[
InkWell(
onTap: () {
if (Platform.isIOS) { MapLauncher.showMarker(
mapType: MapType.apple,
coords: Coords(double.parse(latitude),
double.parse(longitude)),
title: locationDescription,);
} else { MapLauncher.showMarker(
mapType: MapType.google,
coords: Coords(double.parse(latitude),
double.parse(longitude)),
title: locationDescription,
// description: location.locationName,
); }
// MapsLauncher.launchCoordinates(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude), previousModel.productLocationService[index].locationDescription);
},
// MapsLauncher.launchCoordinates(
// double.parse(latitude),
// double.parse(longitude));
// },
child: SvgPicture.asset(
'assets/images/pharmacy/location.svg',
width: 20,
height: 20,
),
),
SizedBox(
width: 20,
),
Expanded(
child: Text(
TranslationBase.of(context).contactUsLocation,
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
),
],
),
),
SizedBox(
height: 50,
),
Center(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
IconButton(
icon: new Image.asset(
'assets/images/new-design/facebook.png'),
tooltip: 'facebook',
iconSize: 48,
onPressed: () {
setState(() {
launch("https://facebook.com/HMG.pharmacy");
// launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn");
});
},
),
IconButton(
icon: new Image.asset(
'assets/images/new-design/twitter.png'),
tooltip: 'Twitter',
iconSize: 48,
onPressed: () {
setState(() {
launch("https://twitter.com/HMG_pharmacy");
});
},
),
IconButton(
icon: new Image.asset(
'assets/images/pharmacy/instagram.png'),
tooltip: 'Instagram',
iconSize: 48,
onPressed: () {
setState(() {
launch("https://instagram.com/HMG_pharmacy");
});
},
),
]),
)
],
),
),
),
],
),
);
}
openWhatsApp() async {
// bool Platform.isIOS = Theme.of(context).platform == TargetPlatform.iOS;
var whatsapp = "+966558434444";
var whatsappURL_android = "whatsapp://send?phone=" + whatsapp;
var whatappURL_ios = "https://wa.me/$whatsapp";
if (Platform.isIOS) {
// for iOS phone only
// if (await canLaunch(whatappURL_ios)) {
await launch(whatappURL_ios, forceSafariVC: false);
// } else {}
} else {
// android
// if (await canLaunch(whatsappURL_android)) {
await launch(whatsappURL_android);
// } else {}
}
}
}

@ -16,6 +16,7 @@ import 'package:diplomaticquarterapp/pages/pharmacies/screens/pharmacy-terms-con
import 'package:diplomaticquarterapp/pages/pharmacies/wishlist.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/wishlist.dart';
import 'package:diplomaticquarterapp/pages/pharmacy/order/Order.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/order/Order.dart';
import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart'; import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyAddresses/PharmacyAddresses.dart';
import 'package:diplomaticquarterapp/pages/pharmacy/pharmacyContacts.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.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';
@ -473,8 +474,8 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
SizedBox( SizedBox(
width: 10, width: 10,
), ),
Text( Text( TranslationBase.of(context).termOfService,
TranslationBase.of(context).conditionsHMG, // TranslationBase.of(context).conditionsHMG,
style: TextStyle( style: TextStyle(
fontSize: 13.0, fontSize: 13.0,
), ),
@ -548,7 +549,7 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.push(context, FadePage(page: LiveChatPage())); Navigator.push(context, FadePage(page: pharmacyContactsPage()));
}, },
child: Row( child: Row(
children: <Widget>[ children: <Widget>[

@ -1,6 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'package:barcode_scan_fix/barcode_scan.dart'; import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacy_categorise_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
@ -277,7 +277,7 @@ class _PharmacyCategorisePageState extends State<PharmacyCategorisePage> {
/// When give qr we will change this method to get data /// When give qr we will change this method to get data
/// var result = await BarcodeScanner.scan(); /// var result = await BarcodeScanner.scan();
/// int patientID = get from qr result /// int patientID = get from qr result
String result = await BarcodeScanner.scan(); String result = (await BarcodeScanner.scan())?.rawContent;
var data = json.decode(result); var data = json.decode(result);
if (data != null) { if (data != null) {
var qRParkingID = data['QRParkingID']; var qRParkingID = data['QRParkingID'];

@ -11,12 +11,14 @@ import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_pharmacy_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart'; import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'base/base_view.dart'; import 'base/base_view.dart';
import 'package:intl/intl.dart' as international;
class SearchProductsPage extends StatefulWidget { class SearchProductsPage extends StatefulWidget {
@override @override
@ -27,6 +29,8 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
final textController = TextEditingController(); final textController = TextEditingController();
final _formKey = GlobalKey<FormState>(); final _formKey = GlobalKey<FormState>();
String msg = ''; String msg = '';
String validText = "";
bool isTextValid = true;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -61,41 +65,27 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
fontSize: 14.5, fontSize: 14.5,
prefixIcon: Icon(Icons.search), prefixIcon: Icon(Icons.search),
inputAction: TextInputAction.search, inputAction: TextInputAction.search,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.allow(
RegExp(r'([A-Za-z0-9 a space])'))
],
validator: (value) {
RegExp regExp = RegExp(r'([A-Za-z0-9 a space])');
if (value.isEmpty) {
TranslationBase.of(context)
.pleaseEnterProductName;
} else if (!regExp.hasMatch(value)) {
AppToast.showErrorToast(
message: TranslationBase.of(context)
.noArabicLetters);
}
return null;
},
onSaved: (value) { onSaved: (value) {
//searchMedicine(model, context); //searchMedicine(model, context);
}, },
onSubmit: (value) { onSubmit: (value) {
searchMedicine(model, context); searchMedicine(model, context);
// msg = 'No Result Found'; // msg = 'No Result Found';
msg = TranslationBase.of(context).noResultFound; msg = TranslationBase.of(context).noSearchResultFound;
}, },
controller: textController, controller: textController,
// validator: (value) {
// if (value.isEmpty) {
//// return 'please Enter Product Name';
// return TranslationBase.of(context).pleaseEnterProductName;
// }
// return null;
// },
), ),
// SizedBox(
// width: 10.0,
// ),
// if(!isTextValid)
// AppText( TranslationBase.of(context)
// .noArabicLetters, color: Colors.red,),
// ],
// ),
), ),
), ),
SizedBox( SizedBox(
width: 10.0, width: 10.0,
), ),
@ -223,16 +213,27 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
Radius.circular( Radius.circular(
6)), 6)),
), ),
child: model.searchList[index].rxMessage != null child: model.searchList[index]
.rxMessage !=
null
? Texts( ? Texts(
projectProvider.isArabic projectProvider
? model.searchList[index].rxMessagen .isArabic
: model.searchList[index].rxMessage, ? model
color: Colors.white, .searchList[
regular: true, index]
fontSize: 10, .rxMessagen
fontWeight: FontWeight.w400, : model
): Texts(""), .searchList[
index]
.rxMessage,
color: Colors.white,
regular: true,
fontSize: 10,
fontWeight:
FontWeight.w400,
)
: Texts(""),
// Texts( // Texts(
// model.searchList[index] // model.searchList[index]
// .rxMessage != // .rxMessage !=
@ -258,11 +259,16 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Texts(projectProvider.isArabic Texts(
? model.searchList[index].namen projectProvider.isArabic
:model.searchList[index].name, ? model
.searchList[index]
.namen
: model
.searchList[index]
.name,
// model.searchList[index].name, // model.searchList[index].name,
regular: true, regular: true,
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
@ -338,6 +344,10 @@ class _SearchProductsPageState extends State<SearchProductsPage> {
); );
} }
bool isRTL(String text) {
return international.Bidi.detectRtlDirectionality(text);
}
searchMedicine(PharmacyCategoriseViewModel model, BuildContext context) { searchMedicine(PharmacyCategoriseViewModel model, BuildContext context) {
Utils.hideKeyboard(context); Utils.hideKeyboard(context);
if (_formKey.currentState.validate()) if (_formKey.currentState.validate())

@ -10,7 +10,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart'; import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:screen/screen.dart'; import 'package:screen_brightness/screen_brightness.dart';
class GeneralSettings extends StatefulWidget { class GeneralSettings extends StatefulWidget {
@override @override
@ -275,7 +275,7 @@ class _GeneralSettings extends State<GeneralSettings> with TickerProviderStateMi
case 0: case 0:
{ {
themeNotifier.setTheme(await getTheme(value)); themeNotifier.setTheme(await getTheme(value));
Screen.setBrightness(1.0); setBrightness(1.0);
} }
break; break;
case 1: case 1:
@ -286,24 +286,33 @@ class _GeneralSettings extends State<GeneralSettings> with TickerProviderStateMi
break; break;
case 2: case 2:
themeNotifier.setTheme(await getTheme(value)); themeNotifier.setTheme(await getTheme(value));
Screen.setBrightness(0.01); setBrightness(0.01);
break; break;
case 3: case 3:
{ {
themeNotifier.setTheme(await getTheme(value)); themeNotifier.setTheme(await getTheme(value));
Screen.setBrightness(1.0); setBrightness(1.0);
} }
break; break;
default: default:
{ {
themeNotifier.setTheme(await getTheme(value)); themeNotifier.setTheme(await getTheme(value));
Screen.setBrightness(1.0); setBrightness(1.0);
} }
break; break;
} }
permission.setTheme(value); permission.setTheme(value);
} }
setBrightness(double brightness) async {
try {
await ScreenBrightness().setScreenBrightness(brightness);
} catch (e) {
print(e);
throw 'Failed to set brightness';
}
}
setVibration(value) { setVibration(value) {
permission.setVibrationPermission(value); permission.setVibrationPermission(value);
} }

@ -280,7 +280,7 @@ class _ProfileSettings extends State<ProfileSettings> with TickerProviderStateMi
TextField( TextField(
enabled: isEnable, enabled: isEnable,
scrollPadding: EdgeInsets.zero, scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.number, keyboardType: TextInputType.emailAddress,
controller: _controller, controller: _controller,
// onChanged: (value) => {validateForm()}, // onChanged: (value) => {validateForm()},
style: TextStyle( style: TextStyle(

@ -76,38 +76,20 @@ class _MyVaccinesState extends State<MyVaccines> {
bottomSheet: Container( bottomSheet: Container(
color: Colors.white, color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: Row( child: DefaultButton(
mainAxisSize: MainAxisSize.min, TranslationBase.of(context).sendEmail,
children: [ () {
Expanded( showDialog(
child: DefaultButton( context: context,
TranslationBase.of(context).availability, builder: (cxt) => ConfirmSendEmailDialog(
() { email: projectViewModel.user.emailAddress,
// Navigator.push(context, FadePage(page: MyVaccinesItemPage())); onTapSendEmail: () {
model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
}, },
color: Color(0xffEAEAEA),
textColor: Color(0xff000000),
), ),
), );
SizedBox(width: 8), },
Expanded( )
child: DefaultButton(
TranslationBase.of(context).sendEmail,
() {
showDialog(
context: context,
builder: (cxt) => ConfirmSendEmailDialog(
email: projectViewModel.user.emailAddress,
onTapSendEmail: () {
model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
},
),
);
},
),
),
],
),
), ),
), ),
); );

@ -20,10 +20,10 @@ class OrderDetailsService extends BaseService{
List<OrderDetailModel> get orderList => _orderList; List<OrderDetailModel> get orderList => _orderList;
Future getOrderDetails(OrderId) async { Future getOrderDetails(OrderId, orderGUID) async {
var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID); var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID);
hasError = false; hasError = false;
await baseAppClient.getPharmacy(GET_ORDER_DETAILS+OrderId + "/$customerGUID", await baseAppClient.getPharmacy(GET_ORDER_DETAILS+OrderId + "/$orderGUID",
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
_orderList.clear(); _orderList.clear();
response['orders'].forEach((item) { response['orders'].forEach((item) {

@ -20,7 +20,7 @@ class OrderService extends BaseService {
hasError = false; hasError = false;
// url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368"; // url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=1&limit=200&customer_id=1367368";
// url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=$pageId&limit=200&customer_id=$customerId"; // url =GET_ORDER+"customer=1,fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc&page=$pageId&limit=200&customer_id=$customerId";
url = GET_ORDER + "customer=1&fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc,product_count,can_cancel,can_refund&page=$pageId&limit=200&customer_id=$customerId&CustomerguId=$customerGUID"; url = GET_ORDER + "customer=1&fields=id,order_total,order_status,order_statusn,order_status_id,created_on_utc,product_count,can_cancel,can_refund,order_guid&page=$pageId&limit=200&customer_id=$customerId&CustomerguId=$customerGUID";
print(url); print(url);
await baseAppClient.getPharmacy(url, onSuccess: (dynamic response, int statusCode) { await baseAppClient.getPharmacy(url, onSuccess: (dynamic response, int statusCode) {

@ -4,11 +4,11 @@ import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/pharmacy/Wishlist.dart'; import 'package:diplomaticquarterapp/models/pharmacy/Wishlist.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
class WishListService extends BaseService { class WishListService extends BaseService {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
bool isLogin = false; bool isLogin = false;
List<Wishlist> _wishListProducts = List(); List<Wishlist> _wishListProducts = List();
List<Wishlist> get wishListProducts => _wishListProducts; List<Wishlist> get wishListProducts => _wishListProducts;
// Future<Map> getWishlist() async { // Future<Map> getWishlist() async {
@ -52,18 +52,17 @@ class WishListService extends BaseService {
Future getWishlist() async { Future getWishlist() async {
//TODO we need to check why the customer id comes null //TODO we need to check why the customer id comes null
String customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID)?? "0"; String customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID) ?? "0";
var customerGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID);
hasError = false; hasError = false;
await baseAppClient.getPharmacy(GET_WISHLIST+customerId +"?shopping_cart_type=2", await baseAppClient.getPharmacy(GET_WISHLIST + customerId + "/$customerGUID/" + "?shopping_cart_type=2", onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) { _wishListProducts.clear();
_wishListProducts.clear(); response['shopping_carts'].forEach((item) {
response['shopping_carts'].forEach((item) { _wishListProducts.add(Wishlist.fromJson(item));
_wishListProducts.add(Wishlist.fromJson(item)); });
}); }, onFailure: (String error, int statusCode) {
}, onFailure: (String error, int statusCode) { hasError = true;
hasError = true; super.error = error;
super.error = error; });
});
} }
} }

@ -0,0 +1,37 @@
import 'dart:io';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:flutter/cupertino.dart';
import 'package:permission_handler/permission_handler.dart';
import 'PlatformBridge.dart';
class AppPermission{
static Future<bool> askVideoCallPermission(BuildContext context) async {
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) {
return false;
}
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await _drawOverAppsMessageDialog(context);
return false;
}
return true;
}
static Future _drawOverAppsMessageDialog(BuildContext context) async {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: "Please select 'Dr. Alh'abib' from the list and allow draw over app permission to use live care.",
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () async {
await PlatformBridge.shared().askDrawOverAppsPermission();
Navigator.pop(context);
},
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
}

@ -1,20 +1,9 @@
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_flexible_toast/flutter_flexible_toast.dart'; import 'package:fluttertoast/fluttertoast.dart';
class AppToast { class AppToast {
/// show long toast message
/// [message] to show for user
/// [timeInSeconds] how many second the toast will appear to the user
/// [toastLength] the time we show the message but should be Toast.LENGTH_SHORT , Toast.LENGTH_LONG
/// [toastGravity] the position of the toast in the screen
/// [backgroundColor] the background color of the toast
/// [textColor] the text color of the toast
/// [icon] the icon you want include in the toast
/// [radius] the radius of the toast
/// [elevation] an overlay color will be applied to indicate elevation.
/// [imageSize] image size inside the toast
static void showToast({ static void showToast({
@required String message, @required String message,
Toast toastLength, Toast toastLength,
@ -23,34 +12,14 @@ class AppToast {
ToastGravity toastGravity, ToastGravity toastGravity,
Color backgroundColor, Color backgroundColor,
Color textColor, Color textColor,
ICON icon,
int radius, int radius,
int elevation, int elevation,
int imageSize, int imageSize,
}) { }) {
FlutterFlexibleToast.showToast( Fluttertoast.showToast(
message: message, msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds, backgroundColor: backgroundColor, textColor: textColor, fontSize: fontSize);
toastLength: toastLength,
timeInSeconds: timeInSeconds,
fontSize: fontSize,
toastGravity: toastGravity,
backgroundColor: backgroundColor,
textColor: textColor,
icon: icon,
radius: radius,
elevation: elevation,
imageSize: imageSize);
} }
/// show Success toast message
/// [message] to show for user
/// [timeInSeconds] how many second the toast will appear to the user
/// [toastLength] the time we show the message but should be Toast.LENGTH_SHORT , Toast.LENGTH_LONG
/// [toastGravity] the position of the toast in the screen
/// [textColor] the text color of the toast
/// [radius] the radius of the toast
/// [elevation] an overlay color will be applied to indicate elevation.
/// [imageSize] image size inside the toast
static void showSuccessToast({ static void showSuccessToast({
@required String message, @required String message,
Toast toastLength = Toast.LENGTH_LONG, Toast toastLength = Toast.LENGTH_LONG,
@ -62,29 +31,9 @@ class AppToast {
int elevation, int elevation,
int imageSize = 32, int imageSize = 32,
}) { }) {
FlutterFlexibleToast.showToast( Fluttertoast.showToast(msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds, backgroundColor: Colors.green, textColor: textColor, fontSize: fontSize);
message: message,
toastLength: toastLength,
timeInSeconds: timeInSeconds = 2,
fontSize: fontSize,
toastGravity: toastGravity,
backgroundColor: Colors.green,
textColor: textColor,
icon: ICON.SUCCESS,
radius: radius,
elevation: elevation,
imageSize: imageSize);
} }
/// show Error toast message
/// [message] to show for user
/// [timeInSeconds] how many second the toast will appear to the user
/// [toastLength] the time we show the message but should be Toast.LENGTH_SHORT , Toast.LENGTH_LONG
/// [toastGravity] the position of the toast in the screen
/// [textColor] the text color of the toast
/// [radius] the radius of the toast
/// [elevation] an overlay color will be applied to indicate elevation.
/// [imageSize] image size inside the toast
static void showErrorToast({ static void showErrorToast({
@required String message, @required String message,
Toast toastLength = Toast.LENGTH_LONG, Toast toastLength = Toast.LENGTH_LONG,
@ -96,30 +45,15 @@ class AppToast {
int elevation, int elevation,
int imageSize = 32, int imageSize = 32,
}) { }) {
FlutterFlexibleToast.showToast( Fluttertoast.showToast(msg: message, toastLength: toastLength, gravity: toastGravity, timeInSecForIosWeb: timeInSeconds, backgroundColor: Colors.red, textColor: textColor, fontSize: fontSize);
message: message,
toastLength: toastLength,
timeInSeconds: timeInSeconds,
fontSize: fontSize,
toastGravity: toastGravity,
backgroundColor: Colors.red,
textColor: textColor,
icon: ICON.CLOSE,
radius: radius,
elevation: elevation,
imageSize: imageSize
);
} }
/// cancel toast
void cancelToast() { void cancelToast() {
FlutterFlexibleToast.cancel(); Fluttertoast.cancel();
} }
void backWithEmpty() { void backWithEmpty() {
AppToast.showErrorToast( AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).empty);
message: TranslationBase.of(AppGlobal.context).empty);
Navigator.of(AppGlobal.context).pop(); Navigator.of(AppGlobal.context).pop();
} }

@ -17,3 +17,5 @@ class NavigationService {
return Navigator.push(key.currentContext, pageRoute); return Navigator.push(key.currentContext, pageRoute);
} }
} }
BuildContext get currentContext => locator<NavigationService>().navigatorKey.currentContext;

@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/uitl/app-permissions.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:huawei_push/huawei_push.dart' as h_push; import 'package:huawei_push/huawei_push.dart' as h_push;
@ -82,7 +83,9 @@ _incomingCall(Map data) async{
LandingPage.incomingCallData = IncomingCallData.fromJson(data); LandingPage.incomingCallData = IncomingCallData.fromJson(data);
if(LandingPage.isOpenCallPage == false){ if(LandingPage.isOpenCallPage == false){
LandingPage.isOpenCallPage = true; LandingPage.isOpenCallPage = true;
await NavigationService.navigateToPage(IncomingCall(incomingCallData: LandingPage.incomingCallData)); final permited = await AppPermission.askVideoCallPermission(currentContext);
if(permited)
await NavigationService.navigateToPage(IncomingCall(incomingCallData: LandingPage.incomingCallData));
LandingPage.isOpenCallPage = false; LandingPage.isOpenCallPage = false;
} }
await Future.delayed(Duration(milliseconds: 500)); await Future.delayed(Duration(milliseconds: 500));

@ -71,6 +71,8 @@ class TranslationBase {
String get noResultFound => localizedValues['noResultFound'][locale.languageCode]; String get noResultFound => localizedValues['noResultFound'][locale.languageCode];
String get noSearchResultFound => localizedValues['noSearchResultFound'][locale.languageCode];
String get pleaseEnterProductName => localizedValues['pleaseEnterProductName'][locale.languageCode]; String get pleaseEnterProductName => localizedValues['pleaseEnterProductName'][locale.languageCode];
String get bookNow => localizedValues['bookNow'][locale.languageCode]; String get bookNow => localizedValues['bookNow'][locale.languageCode];
@ -591,6 +593,10 @@ class TranslationBase {
String get contactUs => localizedValues['ContactUs'][locale.languageCode]; String get contactUs => localizedValues['ContactUs'][locale.languageCode];
String get contactUsLocation => localizedValues['contactUsLocation'][locale.languageCode];
String get contactUsTime => localizedValues['contactUsTime'][locale.languageCode];
String get viewAllWaysReachUs => localizedValues['ViewAllWaysReachUs'][locale.languageCode]; String get viewAllWaysReachUs => localizedValues['ViewAllWaysReachUs'][locale.languageCode];
String get medicalProfile => localizedValues['medicalProfile'][locale.languageCode]; String get medicalProfile => localizedValues['medicalProfile'][locale.languageCode];
@ -995,10 +1001,18 @@ class TranslationBase {
String get edit => localizedValues['edit'][locale.languageCode]; String get edit => localizedValues['edit'][locale.languageCode];
String get whatsApp => localizedValues['whatsApp'][locale.languageCode];
String get phone => localizedValues['phone'][locale.languageCode];
String get delete => localizedValues['delete'][locale.languageCode]; String get delete => localizedValues['delete'][locale.languageCode];
String get addAddress => localizedValues['addAddress'][locale.languageCode]; String get addAddress => localizedValues['addAddress'][locale.languageCode];
String get deleteAddress => localizedValues['deleteAddress'][locale.languageCode];
String get deletedAddress => localizedValues['deletedAddress'][locale.languageCode];
String get addNewAddress => localizedValues['addNewAddress'][locale.languageCode]; String get addNewAddress => localizedValues['addNewAddress'][locale.languageCode];
String get order => localizedValues['order'][locale.languageCode]; String get order => localizedValues['order'][locale.languageCode];

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

@ -200,9 +200,9 @@ class _SecondaryButtonState extends State<SecondaryButton>
width: MediaQuery.of(context).size.width * 2.2, width: MediaQuery.of(context).size.width * 2.2,
height: MediaQuery.of(context).size.width * 2.2, height: MediaQuery.of(context).size.width * 2.2,
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, // shape: BoxShape.circle,
color: widget.disabled color: widget.disabled
? Colors.grey ? widget.disableColor ?? Colors.grey
: widget.color ?? Theme.of(context).buttonColor, : widget.color ?? Theme.of(context).buttonColor,
), ),
), ),
@ -212,8 +212,8 @@ class _SecondaryButtonState extends State<SecondaryButton>
padding: widget.iconOnly padding: widget.iconOnly
? EdgeInsets.symmetric(vertical: 4.0, horizontal: 5.0) ? EdgeInsets.symmetric(vertical: 4.0, horizontal: 5.0)
: EdgeInsets.only( : EdgeInsets.only(
top: widget.small ? 8.0 : 14.0, top: widget.small ? 8.0 : 12.0,
bottom: widget.small ? 6.0 : 14.0, bottom: widget.small ? 6.0 : 12.0,
left: 18.0, left: 18.0,
right: 18.0), right: 18.0),
child: Stack( child: Stack(
@ -246,8 +246,10 @@ class _SecondaryButtonState extends State<SecondaryButton>
bottom: widget.small ? 4.0 : 3.0), bottom: widget.small ? 4.0 : 3.0),
child: Text( child: Text(
widget.label, widget.label,
textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
color: widget.textColor, color: widget.textColor,
fontSize: widget.small ? 12.0 : widget.fontSize??14.0, fontSize: widget.small ? 12.0 : widget.fontSize??14.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: projectViewModel.isArabic fontFamily: projectViewModel.isArabic

@ -187,7 +187,7 @@ class LabResultWidget extends StatelessWidget {
), ),
Utils.tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: true), Utils.tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: true),
Utils.tableColumnValue(labResultList[i].referanceRange, isLast: true, isCapitable: false), Utils.tableColumnValue(labResultList[i].referanceRange, isLast: true, isCapitable: false),
InkWell( !checkIfCovidLab(patientLabResultList) ? InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
@ -203,7 +203,7 @@ class LabResultWidget extends StatelessWidget {
padding: EdgeInsets.only(left: !projectViewModel.isArabic ? 0 : 12, right: !projectViewModel.isArabic ? 12 : 0), padding: EdgeInsets.only(left: !projectViewModel.isArabic ? 0 : 12, right: !projectViewModel.isArabic ? 12 : 0),
child: Utils.tableColumnValueWithUnderLine(TranslationBase.of(context).viewFlowChart, isLast: true, isCapitable: false), child: Utils.tableColumnValueWithUnderLine(TranslationBase.of(context).viewFlowChart, isLast: true, isCapitable: false),
), ),
), ) : Container(),
], ],
), ),
); );

@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/core/model/contactus/get_hmg_locations.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';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:map_launcher/map_launcher.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@ -73,9 +73,17 @@ class HospitalLocation extends StatelessWidget {
), ),
Column( Column(
children: [ children: [
contactButton(Icons.location_on, TranslationBase.of(context).locationa, () { contactButton(
MapsLauncher.launchCoordinates(double.parse(location.latitude), double.parse(location.longitude), location.locationName); Icons.location_on,
}), TranslationBase.of(context).locationa,
() async {
await MapLauncher.showMarker(
mapType: MapType.google,
coords: Coords(double.parse(location.latitude), double.parse(location.longitude)),
title: location.locationName,
);
},
),
SizedBox(height: 10), SizedBox(height: 10),
contactButton(Icons.call, TranslationBase.of(context).callNow, () { contactButton(Icons.call, TranslationBase.of(context).callNow, () {
launch("tel://" + location.phoneNumber); launch("tel://" + location.phoneNumber);

@ -28,13 +28,14 @@ var _InAppBrowserOptions = InAppBrowserClassOptions(
class MyInAppBrowser extends InAppBrowser { class MyInAppBrowser extends InAppBrowser {
_PAYMENT_TYPE paymentType; _PAYMENT_TYPE paymentType;
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT //static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
@ -201,9 +202,14 @@ class MyInAppBrowser extends InAppBrowser {
openPharmacyPaymentBrowser(OrderDetailModel order, double amount, String orderDesc, String transactionID, String emailId, String paymentMethod, String patientName, dynamic patientID, openPharmacyPaymentBrowser(OrderDetailModel order, double amount, String orderDesc, String transactionID, String emailId, String paymentMethod, String patientName, dynamic patientID,
AuthenticatedUser authenticatedUser, InAppBrowser browser) { AuthenticatedUser authenticatedUser, InAppBrowser browser) {
this.browser = browser; this.browser = browser;
MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo);
getPatientData(); getPatientData();
generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) { generatePharmacyURL(order, amount, orderDesc, transactionID, emailId, paymentMethod, patientName, patientID, authenticatedUser).then((value) {
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(value))); if (order.customValuesXml.contains("ApplePay")) {
safariBrowser.open(url: Uri.parse(value));
} else {
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(value)));
}
}); });
} }

@ -1,7 +1,5 @@
import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:nfc_in_flutter/nfc_in_flutter.dart'; import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
void showNfcReader(BuildContext context, {Function onNcfScan}) { void showNfcReader(BuildContext context, {Function onNcfScan}) {
showModalBottomSheet( showModalBottomSheet(
@ -9,8 +7,7 @@ void showNfcReader(BuildContext context, {Function onNcfScan}) {
enableDrag: false, enableDrag: false,
isDismissible: false, isDismissible: false,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(topLeft: Radius.circular(12), topRight: Radius.circular(12)),
topLeft: Radius.circular(12), topRight: Radius.circular(12)),
), ),
backgroundColor: Colors.white, backgroundColor: Colors.white,
builder: (context) { builder: (context) {
@ -30,7 +27,6 @@ class NfcLayout extends StatefulWidget {
} }
class _NfcLayoutState extends State<NfcLayout> { class _NfcLayoutState extends State<NfcLayout> {
StreamSubscription<NDEFMessage> _stream;
bool _reading = false; bool _reading = false;
Widget mainWidget; Widget mainWidget;
String nfcId; String nfcId;
@ -38,47 +34,28 @@ class _NfcLayoutState extends State<NfcLayout> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
readNFC();
}
setState(() { void readNFC() async {
// _reading = true; FlutterNfcKit.poll(timeout: Duration(seconds: 10), androidPlatformSound: false, iosMultipleTagMessage: "Multiple tags found!").then((value) async {
// Start reading using NFC.readNDEF() setState(() {
_stream = NFC _reading = true;
.readNDEF( mainWidget = doneNfc();
once: false,
throwOnUserCancel: false,
readerMode: NFCDispatchReaderMode())
.listen((NDEFMessage message) {
setState(() {
_reading = true;
mainWidget = doneNfc();
});
Future.delayed(const Duration(milliseconds: 500), () {
_stream?.cancel();
widget.onNcfScan(nfcId);
Navigator.pop(context);
});
print("read NDEF id: ${message.id}");
print("NFC Record "+message.payload);
print("NFC Record Lenght "+message.records.length.toString());
print("NFC Record "+message.records.first.id);
print("NFC Record "+message.records.first.payload);
print("NFC Record "+message.records.first.data);
print("NFC Record "+message.records.first.type);
// widget.onNcfScan(message.id);
nfcId = message.id;
}, onError: (e) {
// Check error handling guide below
}); });
Future.delayed(const Duration(milliseconds: 500), () async {
await FlutterNfcKit.finish();
widget.onNcfScan(nfcId);
Navigator.pop(context);
});
nfcId = value.id;
}); });
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
(mainWidget == null && !_reading) (mainWidget == null && !_reading) ? mainWidget = scanNfc() : mainWidget = doneNfc();
? mainWidget = scanNfc() return AnimatedSwitcher(duration: Duration(milliseconds: 500), child: mainWidget);
: mainWidget = doneNfc();
return AnimatedSwitcher(
duration: Duration(milliseconds: 500), child: mainWidget);
} }
Widget scanNfc() { Widget scanNfc() {
@ -125,7 +102,7 @@ class _NfcLayoutState extends State<NfcLayout> {
), ),
child: RaisedButton( child: RaisedButton(
onPressed: () { onPressed: () {
_stream?.cancel(); // _stream?.cancel();
Navigator.pop(context); Navigator.pop(context);
}, },
elevation: 0, elevation: 0,
@ -189,7 +166,7 @@ class _NfcLayoutState extends State<NfcLayout> {
// Navigator.pop(context); // Navigator.pop(context);
// }, // },
onPressed: null, onPressed: null,
elevation: 0, elevation: 0,
child: Text("DONE"), child: Text("DONE"),
), ),
), ),

@ -47,7 +47,7 @@ class PackagesItemCardState extends State<PackagesItemCard> {
aspectRatio: 144 / 144, aspectRatio: 144 / 144,
child: ClipRRect( child: ClipRRect(
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
child: Image.network("https://mdlaboratories.com/offersdiscounts/images/thumbs/0000162_dermatology-testing.jpeg", fit: BoxFit.fill, height: 180.0, width: 180.0), child: Image.network(widget.itemModel.images.isNotEmpty ? widget.itemModel.images[0].src : "https://mdlaboratories.com/offersdiscounts/images/thumbs/0000162_dermatology-testing.jpeg", fit: BoxFit.fill, height: 180.0, width: 180.0),
), ),
), ),
SizedBox(height: 6), SizedBox(height: 6),
@ -61,7 +61,7 @@ class PackagesItemCardState extends State<PackagesItemCard> {
color: Color(0xff2B353E), color: Color(0xff2B353E),
), ),
), ),
Text("Special discount for all HMG Employees and their first…", Text(widget.itemModel.shortDescription,
maxLines: 2, maxLines: 2,
style: TextStyle( style: TextStyle(
fontSize: 12.0, fontSize: 12.0,

@ -1,6 +1,6 @@
import 'package:auto_size_text/auto_size_text.dart'; import 'package:auto_size_text/auto_size_text.dart';
import 'package:badges/badges.dart'; import 'package:badges/badges.dart';
import 'package:barcode_scan_fix/barcode_scan.dart'; import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart'; import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
@ -14,7 +14,6 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart'; import 'package:diplomaticquarterapp/pages/pharmacies/screens/product-details/product-detail.dart';
import 'package:diplomaticquarterapp/pages/search_products_page.dart'; import 'package:diplomaticquarterapp/pages/search_products_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.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';
@ -135,8 +134,7 @@ class AppScaffold extends StatefulWidget {
} }
class _AppScaffoldState extends State<AppScaffold> { class _AppScaffoldState extends State<AppScaffold> {
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
AppBarWidget appBar; AppBarWidget appBar;
@override @override
@ -185,8 +183,7 @@ class _AppScaffoldState extends State<AppScaffold> {
builder: (BuildContext context) { builder: (BuildContext context) {
return InkWell( return InkWell(
onTap: () { onTap: () {
Provider.of<PharmacyPagesViewModel>(context, listen: false) Provider.of<PharmacyPagesViewModel>(context, listen: false).changeCurrentTab(0);
.changeCurrentTab(0);
}, },
child: Container( child: Container(
height: 2.0, height: 2.0,
@ -216,12 +213,9 @@ class _AppScaffoldState extends State<AppScaffold> {
AppGlobal.context = context; AppGlobal.context = context;
PharmacyPagesViewModel pagesViewModel = Provider.of(context); PharmacyPagesViewModel pagesViewModel = Provider.of(context);
bool isUserNotLogin = bool isUserNotLogin = (!Provider.of<ProjectViewModel>(context, listen: false).isLogin && widget.isShowDecPage);
(!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
widget.isShowDecPage);
return Scaffold( return Scaffold(
backgroundColor: backgroundColor: widget.backgroundColor ?? CustomColors.appBackgroudGrey2Color,
widget.backgroundColor ?? CustomColors.appBackgroudGrey2Color,
// appBar: widget.isShowPharmacyAppbar // appBar: widget.isShowPharmacyAppbar
// ? pharmacyAppbar() // ? pharmacyAppbar()
@ -254,8 +248,7 @@ class _AppScaffoldState extends State<AppScaffold> {
isPharmacy: widget.isPharmacy, isPharmacy: widget.isPharmacy,
showPharmacyCart: widget.showPharmacyCart, showPharmacyCart: widget.showPharmacyCart,
isOfferPackages: widget.isOfferPackages, isOfferPackages: widget.isOfferPackages,
showOfferPackagesCart: showOfferPackagesCart: widget.showOfferPackagesCart,
widget.showOfferPackagesCart,
isShowDecPage: widget.isShowDecPage, isShowDecPage: widget.isShowDecPage,
backButtonTab: widget.backButtonTab, backButtonTab: widget.backButtonTab,
) )
@ -294,22 +287,17 @@ class _AppScaffoldState extends State<AppScaffold> {
widget.changeCurrentTab(value); widget.changeCurrentTab(value);
} else { } else {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
locator<NavigationService>().navigatorKey.currentContext, locator<NavigationService>().navigatorKey.currentContext, MaterialPageRoute(builder: (context) => LandingPagePharmacy(currentTab: value)), (Route<dynamic> r) => false);
MaterialPageRoute(
builder: (context) => LandingPagePharmacy(currentTab: value)),
(Route<dynamic> r) => false);
} }
} }
void _scanQrAndGetProduct() async { void _scanQrAndGetProduct() async {
try { try {
String result = await BarcodeScanner.scan(); String result = (await BarcodeScanner.scan())?.rawContent;
try { try {
String barcode = result; String barcode = result;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
await BaseAppClient() await BaseAppClient().getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode", onSuccess: (dynamic response, int statusCode) {
.getPharmacy("$GET_PHARMACY_PRODUCTs_BY_SKU$barcode",
onSuccess: (dynamic response, int statusCode) {
print(response); print(response);
var product = PharmacyProduct.fromJson(response["products"][0]); var product = PharmacyProduct.fromJson(response["products"][0]);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -319,8 +307,7 @@ class _AppScaffoldState extends State<AppScaffold> {
AppToast.showErrorToast(message: "Product not found"); AppToast.showErrorToast(message: "Product not found");
}); });
} catch (apiEx) { } catch (apiEx) {
AppToast.showErrorToast( AppToast.showErrorToast(message: "Something went wrong, please try again");
message: "Something went wrong, please try again");
} }
} catch (barcodeEx) {} } catch (barcodeEx) {}
} }
@ -330,10 +317,7 @@ class _AppScaffoldState extends State<AppScaffold> {
} }
buildBodyWidget(context) { buildBodyWidget(context) {
return Stack(children: <Widget>[ return Stack(children: <Widget>[widget.body, widget.isHelp == true ? RobotIcon() : Container()]);
widget.body,
widget.isHelp == true ? RobotIcon() : Container()
]);
} }
} }
@ -347,16 +331,7 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget {
final List<Widget> appBarIcons; final List<Widget> appBarIcons;
Function onTap; Function onTap;
NewAppBarWidget( NewAppBarWidget({Key key, this.showTitle = false, this.showDropDown = false, this.title = "", this.dropDownList, this.appBarIcons, this.dropdownIndexValue, this.dropDownIndexChange, this.onTap})
{Key key,
this.showTitle = false,
this.showDropDown = false,
this.title = "",
this.dropDownList,
this.appBarIcons,
this.dropdownIndexValue,
this.dropDownIndexChange,
this.onTap})
: super(key: key); : super(key: key);
@override @override
@ -381,13 +356,7 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget {
title, title,
maxLines: 1, maxLines: 1,
style: TextStyle( style: TextStyle(
fontSize: 24, fontSize: 24, fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'), fontWeight: FontWeight.w700, color: Color(0xff2B353E), letterSpacing: -1.44, height: 35 / 24),
fontFamily:
(projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
fontWeight: FontWeight.w700,
color: Color(0xff2B353E),
letterSpacing: -1.44,
height: 35 / 24),
), ),
), ),
if (showDropDown) if (showDropDown)
@ -399,8 +368,7 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget {
alignedDropdown: true, alignedDropdown: true,
child: DropdownButton<int>( child: DropdownButton<int>(
iconEnabledColor: CustomColors.grey2, iconEnabledColor: CustomColors.grey2,
style: TextStyle( style: TextStyle(color: CustomColors.lightGreyColor, fontSize: 12),
color: CustomColors.lightGreyColor, fontSize: 12),
dropdownColor: CustomColors.lightGreyColor, dropdownColor: CustomColors.lightGreyColor,
value: dropdownIndexValue, value: dropdownIndexValue,
items: [ items: [
@ -411,9 +379,7 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget {
dropDownList[i], dropDownList[i],
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontFamily: (projectViewModel.isArabic fontFamily: (projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
? 'Cairo'
: 'Poppins'),
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xff2B2E31), color: Color(0xff2B2E31),
letterSpacing: -.48, letterSpacing: -.48,
@ -455,8 +421,7 @@ class NewAppBarWidget extends StatelessWidget with PreferredSizeWidget {
} }
class AppBarWidget extends StatefulWidget with PreferredSizeWidget { class AppBarWidget extends StatefulWidget with PreferredSizeWidget {
final AuthenticatedUserObject authenticatedUserObject = final AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
final String appBarTitle; final String appBarTitle;
final bool showHomeAppBarIcon; final bool showHomeAppBarIcon;
@ -509,22 +474,12 @@ class AppBarWidgetState extends State<AppBarWidget> {
return AppBar( return AppBar(
elevation: 0, elevation: 0,
backgroundColor: widget.isPharmacy backgroundColor: widget.isPharmacy ? Colors.green : Theme.of(context).appBarTheme.color,
? Colors.green
: Theme.of(context).appBarTheme.color,
textTheme: TextTheme( textTheme: TextTheme(
headline6: TextStyle( headline6: TextStyle(color: Theme.of(context).textTheme.headline1.color, fontWeight: FontWeight.bold),
color: Theme.of(context).textTheme.headline1.color,
fontWeight: FontWeight.bold),
), ),
title: Text( title: Text(widget.authenticatedUserObject.isLogin || !widget.isShowDecPage ? widget.appBarTitle.toUpperCase() : TranslationBase.of(context).serviceInformationTitle,
widget.authenticatedUserObject.isLogin || !widget.isShowDecPage style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).textTheme.headline1.color, fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
? widget.appBarTitle.toUpperCase()
: TranslationBase.of(context).serviceInformationTitle,
style: TextStyle(
fontWeight: FontWeight.bold,
color: Theme.of(context).textTheme.headline1.color,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
leading: Builder( leading: Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
return ArrowBack( return ArrowBack(
@ -538,8 +493,7 @@ class AppBarWidgetState extends State<AppBarWidget> {
? IconButton( ? IconButton(
icon: Badge( icon: Badge(
badgeContent: Text( badgeContent: Text(
orderPreviewViewModel.cartResponse.quantityCount orderPreviewViewModel.cartResponse.quantityCount.toString(),
.toString(),
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),
), ),
child: Icon(Icons.shopping_cart)), child: Icon(Icons.shopping_cart)),
@ -554,10 +508,7 @@ class AppBarWidgetState extends State<AppBarWidget> {
position: BadgePosition.topStart(top: -15, start: -10), position: BadgePosition.topStart(top: -15, start: -10),
badgeContent: Text( badgeContent: Text(
_badgeText, _badgeText,
style: TextStyle( style: TextStyle(fontSize: 9, color: Colors.white, fontWeight: FontWeight.normal),
fontSize: 9,
color: Colors.white,
fontWeight: FontWeight.normal),
), ),
child: Icon(Icons.shopping_cart)), child: Icon(Icons.shopping_cart)),
color: Colors.white, color: Colors.white,
@ -571,10 +522,7 @@ class AppBarWidgetState extends State<AppBarWidget> {
icon: Icon(FontAwesomeIcons.home), icon: Icon(FontAwesomeIcons.home),
color: Colors.white, color: Colors.white,
onPressed: () { onPressed: () {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(context, MaterialPageRoute(builder: (context) => LandingPage()), (Route<dynamic> r) => false);
context,
MaterialPageRoute(builder: (context) => LandingPage()),
(Route<dynamic> r) => false);
// Cart Click Event // Cart Click Event
if (_onCartClick != null) _onCartClick(); if (_onCartClick != null) _onCartClick();

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

@ -54,9 +54,11 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.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/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/text/app_texts_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';
import 'package:flutter/foundation.dart' show TargetPlatform;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_tts/flutter_tts.dart'; import 'package:flutter_tts/flutter_tts.dart';
import 'package:permission_handler/permission_handler.dart'; import 'package:permission_handler/permission_handler.dart';
@ -896,17 +898,6 @@ class RoboSearch {
}); });
showAlertDialog(BuildContext context) { showAlertDialog(BuildContext context) {
//AlertDialog alert = AlertDialog
// AlertDialog alert = AlertDialog(content: MyStatefulBuilder(dispose: () {
// print('dispose!!!!!!!!!!!!');
// })
// isClosed = true;
// streamSubscription.cancel();
// }, builder: (BuildContext context, StateSetter setState) {
// //print(streamSubscription);
// }),
// );
// show the dialog // show the dialog
showDialog( showDialog(
context: context, context: context,
@ -918,7 +909,6 @@ class RoboSearch {
); );
}, },
); );
print(dialog);
} }
static closeAlertDialog(BuildContext context) { static closeAlertDialog(BuildContext context) {
@ -946,6 +936,7 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
var searchText; var searchText;
static StreamSubscription<dynamic> streamSubscription; static StreamSubscription<dynamic> streamSubscription;
static var isClosed = false; static var isClosed = false;
stt.SpeechToText speech = stt.SpeechToText();
@override @override
void initState() { void initState() {
@ -1006,6 +997,21 @@ class _MyStatefulBuilderState extends State<MyStatefulBuilder> {
event.setValue({'startPopUp': 'true'}); event.setValue({'startPopUp': 'true'});
}, },
)) ))
: SizedBox(),
searchText != 'null' && searchText != null && Theme.of(context).platform == TargetPlatform.iOS
? Center(
child: DefaultButton(
TranslationBase.of(context).ok,
() {
RoboSearch.closeAlertDialog(context);
speech.stop();
// event.setValue({"searchText": {
// 'isIOSFeedback':true,
//
// }
// });
},
))
: SizedBox() : SizedBox()
]), ]),
))); )));

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

@ -30,7 +30,7 @@ dependencies:
get_it: ^7.2.0 get_it: ^7.2.0
#Google Fit & Apple HealthKit #Google Fit & Apple HealthKit
fit_kit: ^1.1.2 health: ^3.0.3
#chart #chart
fl_chart: ^0.40.2 fl_chart: ^0.40.2
@ -53,7 +53,8 @@ dependencies:
maps_launcher: ^2.0.1 maps_launcher: ^2.0.1
url_launcher: ^6.0.15 url_launcher: ^6.0.15
shared_preferences: ^2.0.9 shared_preferences: ^2.0.9
flutter_flexible_toast: ^0.1.4 # flutter_flexible_toast: ^0.1.4
fluttertoast: ^8.0.8
firebase_messaging: ^11.1.0 firebase_messaging: ^11.1.0
firebase_analytics: ^8.3.4 firebase_analytics: ^8.3.4
@ -96,7 +97,8 @@ dependencies:
flutter_polyline_points: ^1.0.0 flutter_polyline_points: ^1.0.0
location: ^4.3.0 location: ^4.3.0
# Qr code Scanner # Qr code Scanner
barcode_scan_fix: ^1.0.2 # barcode_scan_fix: ^1.0.2
barcode_scan2: ^4.1.4
# Rating Stars # Rating Stars
rating_bar: ^0.2.0 rating_bar: ^0.2.0
@ -131,7 +133,7 @@ dependencies:
flutter_local_notifications: ^9.1.4 flutter_local_notifications: ^9.1.4
#device_calendar #device_calendar
device_calendar: ^3.1.0 device_calendar: ^4.0.1
#Handle Geolocation #Handle Geolocation
geolocator: ^7.7.1 geolocator: ^7.7.1
@ -141,12 +143,12 @@ dependencies:
#Flutter WebRTC #Flutter WebRTC
flutter_webrtc: ^0.8.0 flutter_webrtc: ^0.8.0
screen: ^0.0.5 screen_brightness: ^0.1.2
#google maps places #google maps places
google_maps_place_picker: ^2.1.0-nullsafety.3 google_maps_place_picker: ^2.1.0-nullsafety.3
map_launcher: ^1.1.3
#countdown timer for Upcoming List #countdown timer for Upcoming List
flutter_countdown_timer: ^4.1.0 flutter_countdown_timer: ^4.1.0
@ -161,7 +163,8 @@ dependencies:
wifi: ^0.1.5 wifi: ^0.1.5
vibration: ^1.7.3 vibration: ^1.7.3
nfc_in_flutter: ^2.0.5
flutter_nfc_kit: ^3.2.0
speech_to_text: speech_to_text:
path: speech_to_text path: speech_to_text
@ -181,8 +184,7 @@ dependencies:
flutter_material_pickers: ^3.1.2 flutter_material_pickers: ^3.1.2
flutter_staggered_grid_view: ^0.4.1 flutter_staggered_grid_view: ^0.4.1
flutter_hms_gms_availability: ^2.0.0 flutter_hms_gms_availability: ^2.0.0
huawei_location: huawei_location: ^6.0.0+302
path: ./hms-plugins/flutter-hms-location
# Marker Animation # Marker Animation
flutter_animarker: ^3.2.0 flutter_animarker: ^3.2.0

Loading…
Cancel
Save