From 1fff2dad251b2109fd6cdf0113e50061cb19e6a4 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 25 Oct 2021 16:21:27 +0300 Subject: [PATCH] Smartwatch updates --- assets/images/SmartWatches/distance.png | Bin 0 -> 3432 bytes assets/images/SmartWatches/steps.png | Bin 0 -> 2739 bytes lib/config/config.dart | 6 +- lib/config/localized_values.dart | 10 + lib/core/service/client/base_app_client.dart | 4 +- lib/core/viewModels/er/rrt-view-model.dart | 46 +- .../rapid-response-team/rrt-logs-page.dart | 9 +- .../rapid-response-team/rrt-main-screen.dart | 51 +- .../rrt-order-list-item.dart | 23 +- .../rapid-response-team/rrt-place-order.dart | 2 +- .../rapid-response-team/rrt-request-page.dart | 9 +- .../distance/distanceTracker.dart | 2 +- .../health_data_list.dart | 163 ++---- .../heartrate/heartrateTracker.dart | 2 +- .../smart_watch_instructions.dart | 547 ++++++------------ .../steps/stepsTracker.dart | 2 +- lib/uitl/translations_delegate_base.dart | 22 + 17 files changed, 373 insertions(+), 525 deletions(-) create mode 100644 assets/images/SmartWatches/distance.png create mode 100644 assets/images/SmartWatches/steps.png diff --git a/assets/images/SmartWatches/distance.png b/assets/images/SmartWatches/distance.png new file mode 100644 index 0000000000000000000000000000000000000000..d07f3e8aa96e286d21389001cb2e0a7142baf592 GIT binary patch literal 3432 zcmV-u4VUtXP)Px?B1uF+RCodHT|ILY$rj8i-4#RTDjROdfJ95?jO7<-2^}FaXSa&% z4Dk!JWX^609cf8`jM3q%a)wkU*gCt)QUcVS+41vCPw)23&h$*rhtQ6;tEBGfkGH$u zr{8}25D^&ICwOj4rN)$4ec+MlpGdw+MOW3u@glN5|(3mp<1LWw_D zf7w+mq1YUtbnEM1e}~1`ntERJgJVd=pWgT{|NQUCzb47_$z<~J$H_bY%k^Ikr{esV z0LQ31Afi{0f0U%NdXARFMRdtjOz+xk1h0FyhX7{Nz~rOv{TEjZ>1Q@6)G6mg(9hw( zwhbVpg$*P0MsR4Ly9VHThV(O=6oLXh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&v=2VLVg;!6MHprYoEP0SH**?zX;QIXFxx;xG3OGZX>Lnb;i0 zYuIlT3VrqWVl=ie{Brxw64cx?MG8>)brBQ@+Tc7lQzgXAK$x1Cxb#2 zJi6hli)((xN^~Uh-|Y{b?d|QoqZFM_SP*+KH+SVeest?E7mnY}UD-kSoOhuuq9G4Q zPw#$+vJ}aqv>+ZbNSGv@KtMj)M@5FM6A#XhILf^w-No1^4%6YFQWRh6ZAh^gUTP5t z$2nwgBub8_4f@m3-JRkIZQF`VXjd#qKj}`Iarj3P%^j7y~A7sB}e&`8<3Il^Z z!vKxwoG#95(24hq`M6M3`&SttM<7^)BW|2eJJ_Cc%?XW+DBEY%95j-d+?M+eb}|JHno&UwcNk-2ZGxzlO4>;DFF{ImRUjN7OLW zdbZBR+3=tvu^cWz8+G(>R#5{NsVKpbFUMZNrKqfj1lO`a0KBbUkUa58K>-Q50Rn); z6L0;30t5ww8cMVsn+0;ulLlBIC?GwVU9=Xkuf)ma9Upbdp!Fy7I1) zE;t}mI1IX0sx0Ir$u0#D@{(*MtY(`k-V~>%{18T^07CMyaJ2wm;hfzYqISAf)m+mM zrBuEu4UlY_V?{%2^xWDSe8!PSX@F4S>BK8S*SdlsS_(YIl0_vm8h%IN(k(iOIhNK` zP^wf9$@Rs01I@OI28_tJl=C@@_eubv1~~%-d$Zgx3U^hnSGa2{qpT!k9aj}I!l?1~ z$?>$J&lwmCMc>}qI0nKFl8wuAKdeI$svJMzHrt>7V3hwDp7BS2`q_M{+(S;9 tm5!0saC8ldMcAN_l(BvDqz+X+{|}~L9uGsWL~Q^7002ovPDHLkV1glF7ncA4 literal 0 HcmV?d00001 diff --git a/lib/config/config.dart b/lib/config/config.dart index 7270f91e..d4ab58a9 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -12,8 +12,8 @@ const PACKAGES_PRODUCTS = '/api/products'; const PACKAGES_CUSTOMER = '/api/customers'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_ORDERS = '/api/orders'; -// const BASE_URL = 'https://uat.hmgwebservices.com/'; -const BASE_URL = 'https://hmgwebservices.com/'; +const BASE_URL = 'https://uat.hmgwebservices.com/'; +// const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs // const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; @@ -452,6 +452,8 @@ const UPDATE_CMC_ORDER_RC = 'rc/api/cmc/update'; // RRT RC SERVICES const ADD_RRT_ORDER_RC = "rc/api/rrt/add"; +const GET_ALL_RRT_ORDERS_RC = "rc/api/rrt/list"; +const UPDATE_RRT_ORDER_RC = 'rc/api/rrt/update'; //Pharmacy wishlist const GET_WISHLIST = "shopping_cart_items/"; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 7584ec6e..d1f138e4 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1584,4 +1584,14 @@ const Map localizedValues = { "avgDistance": { "en": "Average Distance", "ar": "متوسط المسافة" }, "enterDetails": {"en": "Enter Details", "ar": "أدخل التفاصيل"}, "avgHeartRate": { "en": "Average Heart Rate", "ar": "متوسط معدل ضربات القلب" }, + "alreadySynced": { "en": "Already Synced", "ar": "متزامنة" }, + "sync-instructions-intro1": { "en": "It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App", "ar": "يبدو أنك لم تقم بمزامنة بياناتك الصحية مع تطبيق Dr. Alhabib App من قبل. للمتابعة ، تحتاج إلى مزامنة بياناتك الصحية مع تطبيق Dr. Alhabib" }, + "sync-instructions-intro2": { "en": "Before syncing data, please make sure that you have followed the instructions properly", "ar": "قبل مزامنة البيانات ، يرجى التأكد من اتباع التعليمات بشكل صحيح." }, + "sync-instructions-intro3": { "en": "Before syncing data, please make sure that following instructions are met:", "ar": "قبل مزامنة البيانات ، يرجى التأكد من تلبية الإرشادات التالية:" }, + "ios-instructions-1": { "en": "Make sure that you have installed 'Health' App & 'Watch' App from Apple Store.", "ar": "تأكد من أنك قمت بتثبيت تطبيق 'Health' App & 'Watch' من متجر Apple." }, + "ios-instructions-2": { "en": "Make sure that your Apple Watch is connected with the Watch & Health Apps.", "ar": "تأكد من اتصال Apple Watch بتطبيقات Watch & Health." }, + "ios-instructions-3": { "en": "Make sure that data like heart rate, steps, distance etc. are being shown on your health app.", "ar": "تأكد من عرض بيانات مثل معدل ضربات القلب والخطوات والمسافة وما إلى ذلك على تطبيق صحتك." }, + "supportedWatches": { "en": "Supported SmartWatches", "ar": "الساعات الذكية المدعومة" }, + "watchInstructions": { "en": "Watch Instructions:", "ar": "تعليمات الساعة:" }, + "monthlyTab": {"en": "Monthly", "ar": "شهري"}, }; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 4f8a3f5d..c35be69b 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -114,8 +114,10 @@ class BaseAppClient { } } + // body['IdentificationNo'] = 1009199553; + // body['MobileNo'] = "966545156035"; // body['PatientID'] = 1018977; - body['TokenID'] = "@dm!n"; + // body['TokenID'] = "@dm!n"; body.removeWhere((key, value) => key == null || value == null); diff --git a/lib/core/viewModels/er/rrt-view-model.dart b/lib/core/viewModels/er/rrt-view-model.dart index 83732ebd..60411fab 100644 --- a/lib/core/viewModels/er/rrt-view-model.dart +++ b/lib/core/viewModels/er/rrt-view-model.dart @@ -3,6 +3,7 @@ import 'dart:async'; import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; @@ -17,8 +18,8 @@ import '../base_view_model.dart'; class RRTService extends BaseService {} class _RRTServiceData { - List pendingOrders = []; - List completedOrders = []; + List pendingOrders = []; + List completedOrders = []; ServicePrice servicePrice; } @@ -34,7 +35,8 @@ class RRTViewModel extends BaseViewModel { Future<_RRTServiceData> loadRequiredData() async { await getServicePrice(); - await getAllOrders(); + // await getAllOrders(); + await getAllOrdersRC(); return rrtServiceData; } @@ -79,9 +81,9 @@ class RRTViewModel extends BaseViewModel { if (json["ServiceID"] == 5) { if (json["Status"] == 1 || json["Status"] == 2) { // Pending - rrtServiceData.pendingOrders.add(PrescriptionsOrder.fromJson(json)); + rrtServiceData.pendingOrders.add(GetCMCAllOrdersResponseModel.fromJson(json)); } - rrtServiceData.completedOrders.add(PrescriptionsOrder.fromJson(json)); + rrtServiceData.completedOrders.add(GetCMCAllOrdersResponseModel.fromJson(json)); } }); } @@ -91,6 +93,26 @@ class RRTViewModel extends BaseViewModel { return rrtServiceData; } + Future<_RRTServiceData> getAllOrdersRC() async { + await _service.baseAppClient.post(GET_ALL_RRT_ORDERS_RC, body: {}, onSuccess: (response, statusCode) { + var data = response["response"]; + rrtServiceData.completedOrders.clear(); + rrtServiceData.pendingOrders.clear(); + if (data != null && data is List) { + data.forEach((json) { + if (json["StatusId"] == 1 || json["StatusId"] == 2) { + // Pending + rrtServiceData.pendingOrders.add(GetCMCAllOrdersResponseModel.fromJson(json)); + } + rrtServiceData.completedOrders.add(GetCMCAllOrdersResponseModel.fromJson(json)); + }); + } + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + }); + return rrtServiceData; + } + Future getOrderDetails() async { return null; } @@ -136,6 +158,19 @@ class RRTViewModel extends BaseViewModel { return Future.value(success); } + Future cancelOrderRC(GetCMCAllOrdersResponseModel order, {String reason = ""}) async { + Map body = {"Id": order.iD, "ClickButton": 16}; + var success = false; + await _service.baseAppClient.post(UPDATE_RRT_ORDER_RC, body: body, onSuccess: (response, statusCode) { + success = true; + rrtServiceData.pendingOrders.remove(order); + }, onFailure: (error, statusCode) { + AppToast.showErrorToast(message: error); + success = false; + }); + return Future.value(success); + } + Future> getAddresses() async { Object error; try { @@ -175,7 +210,6 @@ class RRTViewModel extends BaseViewModel { await getCustomerAddresses(); } - // setState(ViewState.Busy); // await _pharmacy_service.generatePharmacyToken(); // if (_customerAddressesService.hasError) { diff --git a/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart b/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart index c7c12a2d..2a1dd3c9 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-logs-page.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-order-list-item.dart'; @@ -11,7 +12,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart'; class RRTLogPage extends StatefulWidget { - final List orders; + final List orders; const RRTLogPage({this.orders}); @@ -45,13 +46,13 @@ class RRTLogPageState extends State { }); } - deleteOrder(PrescriptionsOrder order) async { + deleteOrder(GetCMCAllOrdersResponseModel order) async { GifLoaderDialogUtils.showMyDialog(context); - var success = await viewModel.cancelOrder(order); + var success = await viewModel.cancelOrderRC(order); if (success) { viewModel.setState(ViewState.Busy); - await viewModel.getAllOrders(); + await viewModel.getAllOrdersRC(); viewModel.setState(ViewState.Idle); Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); Navigator.push(context, FadePage(page: RRTMainScreen())); diff --git a/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart b/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart index 351c918a..62fa4745 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-main-screen.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; @@ -7,10 +8,13 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class RRTMainScreen extends StatefulWidget { final index = 0; + RRTMainScreen({index}); + @override State createState() => RRTMainScreenState(); } @@ -25,6 +29,8 @@ class RRTMainScreenState extends State with SingleTickerProviderS List imagesInfo = List(); + ProjectViewModel projectViewModel; + @override void initState() { super.initState(); @@ -36,6 +42,7 @@ class RRTMainScreenState extends State with SingleTickerProviderS @override Widget build(BuildContext context) { + projectViewModel = Provider.of(context); localize = TranslationBase.of(context); return AppScaffold( @@ -80,20 +87,40 @@ class RRTMainScreenState extends State with SingleTickerProviderS margin: EdgeInsets.all(0.0), clipBehavior: Clip.hardEdge, decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)), - child: TabBar(onTap: onPageChanged, indicatorWeight: 3, indicatorColor: Color(0xFFc5272d), isScrollable: false, controller: tabController, indicatorSize: TabBarIndicatorSize.label, tabs: [ - Tab( - child: Text( - localize.rapidResponseTeam, - style: TextStyle(color: Theme.of(context).appBarTheme.color), + child: TabBar( + onTap: onPageChanged, + controller: tabController, + indicatorWeight: 3.0, + indicatorSize: TabBarIndicatorSize.tab, + labelColor: Color(0xff2B353E), + unselectedLabelColor: Color(0xff575757), + labelPadding: EdgeInsets.only(top: 5, bottom: 5), + labelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 15, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, ), - ), - Tab( - child: Text( - localize.orderLog, - style: TextStyle(color: Theme.of(context).appBarTheme.color), + unselectedLabelStyle: TextStyle( + fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', + fontSize: 15, + fontWeight: FontWeight.w600, + letterSpacing: -0.48, ), - ), - ]), + tabs: [ + Tab( + child: Text( + localize.rapidResponseTeam, + style: TextStyle(color: Theme.of(context).appBarTheme.color), + ), + ), + Tab( + child: Text( + localize.orderLog, + style: TextStyle(color: Theme.of(context).appBarTheme.color), + ), + ), + ]), ); Widget contentPager() => PageView( diff --git a/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart b/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart index a2ef7cd0..8a4f1e18 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-order-list-item.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; @@ -16,8 +17,8 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart'; final _item_content_seperator = Container(height: 0.25, padding: EdgeInsets.all(10), color: Colors.grey.withOpacity(0.5)); class RRTLogListItem extends StatefulWidget { - final PrescriptionsOrder order; - final Function(PrescriptionsOrder) onCancel; + final GetCMCAllOrdersResponseModel order; + final Function(GetCMCAllOrdersResponseModel) onCancel; RRTLogListItem(this.order, {this.onCancel}); @override @@ -34,8 +35,8 @@ class RRTLogListItemState extends State { ProjectViewModel projectViewModel = Provider.of(context); localize = TranslationBase.of(context); - int status = widget.order.status; - String _statusDisp = projectViewModel.isArabic ? widget.order.descriptionN : widget.order.description; + int status = widget.order.statusId; + String _statusDisp = widget.order.statusText; Color _color; if (status == 1) { //pending @@ -46,7 +47,7 @@ class RRTLogListItemState extends State { } else if (status == 3) { //completed _color = Color(0xff359846); - } else if (status == 4) { + } else if (status == 4 || status == 6 || status == 7) { //cancel // Rejected _color = Color(0xffD02127); } @@ -111,7 +112,7 @@ class RRTLogListItemState extends State { ), Expanded( child: Text( - !projectViewModel.isArabic ? widget.order.nearestProjectDescription.trim().toString() : widget.order.nearestProjectDescriptionN.toString(), + widget.order.projectName.toString(), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), ), ), @@ -126,7 +127,7 @@ class RRTLogListItemState extends State { ), Expanded( child: Text( - widget.order.getFormattedDateTime(), + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.order.created)), style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.56), ), ), @@ -140,11 +141,11 @@ class RRTLogListItemState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - DateUtil.getDayMonthYearDateFormattedLang(widget.order.createdOn, projectViewModel.isArabic), + DateUtil.getDayMonthYearDateFormatted(DateTime.tryParse(widget.order.created)), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10), ), SizedBox(height: 12), - if (widget.order.status == 1 || widget.order.status == 2) + if (widget.order.statusId == 1 || widget.order.statusId == 2) InkWell( onTap: () { //onCancel(order); @@ -227,11 +228,11 @@ class RRTLogListItemState extends State { // ); cancelOrders(order) async { GifLoaderDialogUtils.showMyDialog(context); - var success = await viewModel.cancelOrder(order); + var success = await viewModel.cancelOrderRC(order); if (success) { viewModel.setState(ViewState.Busy); - await viewModel.getAllOrders(); + await viewModel.getAllOrdersRC(); viewModel.setState(ViewState.Idle); Navigator.popUntil(context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); Navigator.push(context, FadePage(page: RRTMainScreen())); diff --git a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart index 4e863bd1..938b0528 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-place-order.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-place-order.dart @@ -217,7 +217,7 @@ class RRTPlaceOrderPage extends StatelessWidget { gotoRRTRoot() async { viewModel.setState(ViewState.Busy); - await viewModel.getAllOrders(); + await viewModel.getAllOrdersRC(); viewModel.setState(ViewState.Idle); Navigator.popUntil(_context, (route) => Utils.route(route, equalsTo: RRTMainScreen)); Navigator.push(_context, FadePage(page: RRTMainScreen())); diff --git a/lib/pages/ErService/rapid-response-team/rrt-request-page.dart b/lib/pages/ErService/rapid-response-team/rrt-request-page.dart index 28cd3cf4..1848f52c 100644 --- a/lib/pages/ErService/rapid-response-team/rrt-request-page.dart +++ b/lib/pages/ErService/rapid-response-team/rrt-request-page.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/GetCMCAllOrdersResponseModel.dart'; import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; @@ -15,7 +16,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class RRTRequestPage extends StatefulWidget { - final List pendingOrders; + final List pendingOrders; final ServicePrice servicePrice; RRTRequestPage({this.pendingOrders, this.servicePrice}); @@ -208,14 +209,14 @@ class RRTRequestPageState extends State { ))); } - deleteOrder(PrescriptionsOrder order) async { + deleteOrder(GetCMCAllOrdersResponseModel order) async { GifLoaderDialogUtils.showMyDialog(context); - var success = await viewModel.cancelOrder(order); + var success = await viewModel.cancelOrderRC(order); GifLoaderDialogUtils.hideDialog(context); if (success) setState(() { widget.pendingOrders.remove(order); }); - await viewModel.getAllOrders(); + await viewModel.getAllOrdersRC(); } } diff --git a/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart b/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart index 787bc210..cceb8b1e 100644 --- a/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart +++ b/lib/pages/medical/smart_watch_health_data/distance/distanceTracker.dart @@ -89,7 +89,7 @@ class _DistanceTrackerState extends State with SingleTickerProv ), tabs: [ Tab(text: TranslationBase.of(context).weekly), - Tab(text: TranslationBase.of(context).monthly), + Tab(text: TranslationBase.of(context).monthlyTab), Tab(text: TranslationBase.of(context).yearly), ], onTap: (value) { diff --git a/lib/pages/medical/smart_watch_health_data/health_data_list.dart b/lib/pages/medical/smart_watch_health_data/health_data_list.dart index f63e3151..f43a6e63 100644 --- a/lib/pages/medical/smart_watch_health_data/health_data_list.dart +++ b/lib/pages/medical/smart_watch_health_data/health_data_list.dart @@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/dista import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -30,118 +31,35 @@ class _HealthDataListState extends State { @override Widget build(BuildContext context) { + List myMedicalList = myOptionsList(context); return AppScaffold( appBarTitle: TranslationBase.of(context).smartWatches, isShowAppBar: true, showNewAppBar: true, showNewAppBarTitle: true, body: Container( - height: MediaQuery.of(context).size.height, - margin: EdgeInsets.all(20.0), child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: HeartRateTracker(), - ), - ); - }, - child: Row( - children: [ - Container( - child: Image.asset("assets/images/SmartWatches/heartrate_icon.png", width: 60.0, height: 60.0), - ), - Container( - margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0), - child: Text(TranslationBase.of(context).heart, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), - ), - ], - ), - ), - Divider( - color: Colors.grey[500], - ), - Row( - children: [ - Container( - child: Image.asset("assets/images/SmartWatches/sleep_data.png", width: 60.0, height: 60.0), - ), - Container( - margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0), - child: Text("Sleep Data", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), - ), - ], + Container( + width: double.infinity, + height: 20, ), - Divider( - color: Colors.grey[500], - ), - InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: StepsTracker(), - ), - ); - }, - child: Row( - children: [ - Container( - child: Image.asset("assets/images/SmartWatches/heartrate_icon.png", width: 60.0, height: 60.0), - ), - Container( - margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0), - child: Text(TranslationBase.of(context).steps, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), - ), - ], + Padding( + padding: EdgeInsets.only(left: 12, right: 12), + child: GridView.builder( + shrinkWrap: true, + primary: false, + physics: NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: 2 / 2, crossAxisSpacing: 12, mainAxisSpacing: 12), + padding: EdgeInsets.zero, + itemCount: myMedicalList.length, + itemBuilder: (BuildContext context, int index) { + return myMedicalList[index]; + }, ), ), - Divider( - color: Colors.grey[500], - ), - InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: DistanceTracker(), - ), - ); - }, - child: Row( - children: [ - Container( - child: Image.asset("assets/images/SmartWatches/heartrate_icon.png", width: 60.0, height: 60.0), - ), - Container( - margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0), - child: Text(TranslationBase.of(context).distance, style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), - ), - ], - ), - ), - Divider( - color: Colors.grey[500], - ), - // Row( - // children: [ - // Container( - // child: Image.asset("assets/images/SmartWatches/heartrate_icon.png", width: 60.0, height: 60.0), - // ), - // Container( - // margin: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 0.0), - // child: Text("Energy", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)), - // ), - // ], - // ), - // Divider( - // color: Colors.grey[500], - // ), ], ), ), @@ -159,6 +77,53 @@ class _HealthDataListState extends State { ); } + + List myOptionsList(BuildContext context) { + List medical = List(); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: HeartRateTracker()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).heart, + imagePath: 'assets/images/SmartWatches/heartrate_icon.png', + subTitle: null, + isPngImage: true, + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: StepsTracker()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).steps, + imagePath: 'assets/images/SmartWatches/steps.png', + subTitle: null, + isPngImage: true, + ), + )); + + medical.add(InkWell( + onTap: () => Navigator.push( + context, + FadePage(page: DistanceTracker()), + ), + child: MedicalProfileItem( + title: TranslationBase.of(context).distance, + imagePath: 'assets/images/SmartWatches/distance.png', + subTitle: null, + isPngImage: true, + ), + )); + + return medical; + } + + // void readLast() async { // print("ReadLast"); // final result = await FitKit.readLast(DataType.DISTANCE); diff --git a/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart b/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart index 1c109669..da82d540 100644 --- a/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart +++ b/lib/pages/medical/smart_watch_health_data/heartrate/heartrateTracker.dart @@ -89,7 +89,7 @@ class _HeartRateTrackerState extends State with SingleTickerPr ), tabs: [ Tab(text: TranslationBase.of(context).weekly), - Tab(text: TranslationBase.of(context).monthly), + Tab(text: TranslationBase.of(context).monthlyTab), Tab(text: TranslationBase.of(context).yearly), ], onTap: (value) { diff --git a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart index b4471611..4c515e3a 100644 --- a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart +++ b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart @@ -8,6 +8,8 @@ import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/healt import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/uitl/utils_new.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; @@ -24,13 +26,12 @@ class _SmartWatchInstructionsState extends State { bool hasAlreadySynced = false; - AuthenticatedUserObject authenticatedUserObject = - locator(); + AuthenticatedUserObject authenticatedUserObject = locator(); @override void initState() { WidgetsBinding.instance.addPostFrameCallback((timeStamp) { - if(authenticatedUserObject.isLogin) getLastPatientRecord(context); + if (authenticatedUserObject.isLogin) getLastPatientRecord(context); }); super.initState(); } @@ -49,9 +50,7 @@ class _SmartWatchInstructionsState extends State { ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/1.png') ], body: Container( - child: Platform.isIOS - ? _getAppleWatchInstructions() - : _getGoogleWatchInstructions(), + child: Platform.isIOS ? _getAppleWatchInstructions() : _getGoogleWatchInstructions(), )); } @@ -65,10 +64,7 @@ class _SmartWatchInstructionsState extends State { // margin: EdgeInsets.only(top: 10.0), child: CarouselSlider( carouselController: buttonCarouselController, - options: CarouselOptions( - enableInfiniteScroll: false, - viewportFraction: 0.95, - height: MediaQuery.of(context).size.height * 0.9), + options: CarouselOptions(enableInfiniteScroll: false, viewportFraction: 0.95, height: MediaQuery.of(context).size.height * 0.9), items: [1, 2].map((i) { return Builder( builder: (BuildContext context) { @@ -83,33 +79,24 @@ class _SmartWatchInstructionsState extends State { ), child: i == 1 ? Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - margin: EdgeInsets.only(top: 10.0), - child: Text("Supported Smartwatches", - style: TextStyle( - fontSize: 22.0, - fontWeight: FontWeight.bold)), + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).supportedWatches, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)), ), Container( child: Row( children: [ Expanded( child: Container( - margin: - EdgeInsets.only(top: 10.0), + margin: EdgeInsets.only(top: 10.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/apple-watch-1.jpeg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/apple-watch-1.jpeg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text( - "Apple Watch Series 1", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 1", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -117,20 +104,13 @@ class _SmartWatchInstructionsState extends State { ), Expanded( child: Container( - margin: - EdgeInsets.only(top: 10.0), + margin: EdgeInsets.only(top: 10.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/apple-watch-2.jpg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/apple-watch-2.jpg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text( - "Apple Watch Series 2", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -145,20 +125,13 @@ class _SmartWatchInstructionsState extends State { children: [ Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/apple-watch-3.jpg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/apple-watch-3.jpg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text( - "Apple Watch Series 3", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -166,20 +139,13 @@ class _SmartWatchInstructionsState extends State { ), Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/apple-watch-4.jpg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/apple-watch-4.jpg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text( - "Apple Watch Series 4", overflow: TextOverflow.clip , - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -194,20 +160,13 @@ class _SmartWatchInstructionsState extends State { children: [ Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/apple-watch-5.jpg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/apple-watch-5.jpg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text( - "Apple Watch Series 5", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 5", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -215,20 +174,13 @@ class _SmartWatchInstructionsState extends State { ), Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/Apple-Watch-6.png", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/Apple-Watch-6.png", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text( - "Apple Watch Series 6", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Apple Watch Series 6", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -243,19 +195,13 @@ class _SmartWatchInstructionsState extends State { children: [ Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/miBand3.jpg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text("Mi Band 3", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -263,19 +209,13 @@ class _SmartWatchInstructionsState extends State { ), Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/miBand4.jpg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text("Mi Band 4", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -285,143 +225,78 @@ class _SmartWatchInstructionsState extends State { ), ), Container( - margin: EdgeInsets.fromLTRB( - 10.0, 30.0, 10.0, 10.0), - child: Text( - "It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + margin: EdgeInsets.fromLTRB(10.0, 30.0, 10.0, 10.0), + child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), ), Container( margin: EdgeInsets.all(10.0), - child: Text( - "Before syncing data, please make sure that you have followed the instructions properly", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + child: Text(TranslationBase.of(context).syncInstructionsIntro2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), ), Container( - margin: EdgeInsets.all(15.0), - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(10.0), - ), - minWidth: - MediaQuery.of(context).size.width, - height: 45.0, - child: RaisedButton( - color: new Color(0xFF60686b), - textColor: Colors.white, - elevation: 0, - disabledTextColor: Colors.white, - disabledColor: new Color(0xFFbcc2c4), - onPressed: () { - buttonCarouselController.nextPage(); - }, - child: Text("CONTINUE", - style: TextStyle(fontSize: 18.0)), - ), + margin: EdgeInsets.fromLTRB(15.0, 40.0, 15.0, 0.0), + child: DefaultButton( + TranslationBase.of(context).continues, + () { + buttonCarouselController.nextPage(); + }, + color: Color(0xff359846), ), ), ], ) : Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - margin: EdgeInsets.only(top: 10.0), - child: Text("Watch Instructions:", - style: TextStyle( - fontSize: 22.0, - fontWeight: FontWeight.bold, - fontFamily: "WorkSans")), + margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), + child: Text(TranslationBase.of(context).watchInstructions, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)), ), Container( - margin: EdgeInsets.all(10.0), - child: Text( - "It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), + child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), ), Container( - margin: EdgeInsets.fromLTRB( - 10.0, 20.0, 10.0, 10.0), - child: Text( - "Before syncing data, please make sure that following instructions are met: ", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), + child: Text(TranslationBase.of(context).syncInstructionsIntro3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), ), Container( - margin: EdgeInsets.fromLTRB( - 10.0, 20.0, 10.0, 10.0), - child: Text( - "1. Make sure that you have installed 'Health' App & 'Watch' App from Apple Store.", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), + child: Text(TranslationBase.of(context).iosInstructions1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), ), Container( - margin: EdgeInsets.all(10.0), - child: Text( - "2. Make sure that your Apple Watch is connected with the Watch & Health Apps.", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), + child: Text(TranslationBase.of(context).iosInstructions2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), ), Container( - margin: EdgeInsets.all(10.0), - child: Text( - "3. Make sure that data like heart rate, steps, distance etc. are being shown on your health app.", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), + child: Text(TranslationBase.of(context).iosInstructions3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), ), - Container( - margin: EdgeInsets.fromLTRB( - 15.0, 80.0, 15.0, 15.0), - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(10.0), - ), - minWidth: - MediaQuery.of(context).size.width, - height: 45.0, - child: RaisedButton( - color: new Color(0xFF60686b), - textColor: Colors.white, - elevation: 0, - disabledTextColor: Colors.white, - disabledColor: new Color(0xFFbcc2c4), - onPressed: () { - buttonCarouselController.nextPage(); - }, - child: Text("SYNC HEALTH DATA", - style: TextStyle(fontSize: 18.0)), - ), + Padding( + padding: const EdgeInsets.fromLTRB(12.0, 50.0, 12.0, 20.0), + child: Row( + children: [ + Expanded( + child: DefaultButton( + TranslationBase.of(context).syncHealthData, + () {}, + color: Color(0xFFD02127), + disabledColor: Color(0xff28323A).withOpacity(0.3), + ), + ), + mWidth(12), + if (hasAlreadySynced) + Expanded( + child: DefaultButton( + TranslationBase.of(context).alreadySynced, + () { + _openHealthDataList(); + }, + color: Color(0xff359846), + ), + ), + ], ), ), - hasAlreadySynced ? Container( - margin: EdgeInsets.fromLTRB( - 15.0, 0.0, 15.0, 15.0), - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(10.0), - ), - minWidth: - MediaQuery.of(context).size.width, - height: 45.0, - child: RaisedButton( - color: new Color(0xFF60686b), - textColor: Colors.white, - elevation: 0, - disabledTextColor: Colors.white, - disabledColor: new Color(0xFFbcc2c4), - onPressed: () { - _openHealthDataList(); - }, - child: Text("ALREADY SYNCED", - style: TextStyle(fontSize: 18.0)), - ), - ), - ): Container(), ], ), )); @@ -447,7 +322,7 @@ class _SmartWatchInstructionsState extends State { options: CarouselOptions( // enableInfiniteScroll: true, viewportFraction: 0.99, - height: MediaQuery.of(context).size.height*1.1 ), + height: MediaQuery.of(context).size.height * 0.9), items: [1, 2].map((i) { return Builder( builder: (BuildContext context) { @@ -455,7 +330,7 @@ class _SmartWatchInstructionsState extends State { width: MediaQuery.of(context).size.width, margin: EdgeInsets.symmetric(horizontal: 5.0), child: Card( - margin: EdgeInsets.only(top:16.0 , bottom: 8.0), + margin: EdgeInsets.only(top: 16.0, bottom: 8.0), // fromLTRB(8.0, 16.0, 8.0, 8.0), color: Colors.white.withOpacity(1.0), shape: RoundedRectangleBorder( @@ -466,31 +341,20 @@ class _SmartWatchInstructionsState extends State { children: [ Container( margin: EdgeInsets.only(top: 10.0), - child: Text("Supported Smartwatches", - style: TextStyle( - fontSize: 22.0, - fontWeight: FontWeight.bold, - fontFamily: "WorkSans")), + child: Text("Supported Smartwatches", style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, fontFamily: "WorkSans")), ), Container( child: Row( children: [ Expanded( child: Container( - margin: - EdgeInsets.only(top: 10.0), + margin: EdgeInsets.only(top: 10.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/huawei-watch-2.png", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/huawei-watch-2.png", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text( - "Huawei Watch 2", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Huawei Watch 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -498,21 +362,13 @@ class _SmartWatchInstructionsState extends State { ), Expanded( child: Container( - margin: - EdgeInsets.only(top: 10.0), + margin: EdgeInsets.only(top: 10.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/ticwatche2.png", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text( - "Mobovi TicWatch E2", - overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Mobovi TicWatch E2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -527,19 +383,13 @@ class _SmartWatchInstructionsState extends State { children: [ Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/huawei-watch-2-classic.png", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/huawei-watch-2-classic.png", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text("Huawei Watch", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Huawei Watch", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -547,19 +397,13 @@ class _SmartWatchInstructionsState extends State { ), Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/ticwatche2.png", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/ticwatche2.png", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text("Fossil Sport", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Fossil Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -574,20 +418,13 @@ class _SmartWatchInstructionsState extends State { children: [ Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/misfit-vapor-2.jpg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/misfit-vapor-2.jpg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text( - "MisFit Vapor 2", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("MisFit Vapor 2", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -595,20 +432,13 @@ class _SmartWatchInstructionsState extends State { ), Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/lg-watch-sport.jpg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/lg-watch-sport.jpg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text( - "LG Watch Sport", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("LG Watch Sport", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -623,19 +453,13 @@ class _SmartWatchInstructionsState extends State { children: [ Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/miBand3.jpg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/miBand3.jpg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text("Mi Band 3", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Mi Band 3", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -643,19 +467,13 @@ class _SmartWatchInstructionsState extends State { ), Expanded( child: Container( - margin: - EdgeInsets.only(top: 15.0), + margin: EdgeInsets.only(top: 15.0), child: Row( children: [ - Image.asset( - "assets/images/SmartWatches/miBand4.jpg", - width: 70.0, - height: 70.0), + Image.asset("assets/images/SmartWatches/miBand4.jpg", width: 70.0, height: 70.0), Container( - width: MediaQuery.of(context).size.width*0.22, - child: Text("Mi Band 4", overflow: TextOverflow.clip, - style: TextStyle( - fontSize: 12.0)), + width: MediaQuery.of(context).size.width * 0.22, + child: Text("Mi Band 4", overflow: TextOverflow.clip, style: TextStyle(fontSize: 12.0)), ) ], ), @@ -666,18 +484,11 @@ class _SmartWatchInstructionsState extends State { ), InkWell( onTap: () { - launch( - "https://wearos.google.com/#find-your-watch"); + launch("https://wearos.google.com/#find-your-watch"); }, child: Container( margin: EdgeInsets.only(top: 20.0), - child: Text( - "More Supported Smartwatches...", - style: TextStyle( - fontSize: 17.0, - color: Colors.blue, - decoration: - TextDecoration.underline)), + child: Text("More Supported Smartwatches...", style: TextStyle(fontSize: 17.0, color: Colors.blue, decoration: TextDecoration.underline)), ), ), Container( @@ -689,20 +500,16 @@ class _SmartWatchInstructionsState extends State { ), Container( margin: EdgeInsets.all(10.0), - child: Text( - "Before syncing data, please make sure that you have followed the instructions properly", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + child: + Text("Before syncing data, please make sure that you have followed the instructions properly", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), ), Container( margin: EdgeInsets.all(15.0), child: ButtonTheme( shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(10.0), + borderRadius: BorderRadius.circular(10.0), ), - minWidth: - MediaQuery.of(context).size.width, + minWidth: MediaQuery.of(context).size.width, height: 45.0, child: RaisedButton( color: new Color(0xFF60686b), @@ -713,8 +520,7 @@ class _SmartWatchInstructionsState extends State { onPressed: () { buttonCarouselController.nextPage(); }, - child: Text("CONTINUE", - style: TextStyle(fontSize: 18.0)), + child: Text("CONTINUE", style: TextStyle(fontSize: 18.0)), ), ), ), @@ -724,11 +530,7 @@ class _SmartWatchInstructionsState extends State { children: [ Container( margin: EdgeInsets.only(top: 10.0), - child: Text("Watch Instructions:", - style: TextStyle( - fontSize: 22.0, - fontWeight: FontWeight.bold, - fontFamily: "WorkSans")), + child: Text("Watch Instructions:", style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, fontFamily: "WorkSans")), ), Container( margin: EdgeInsets.all(10.0), @@ -739,49 +541,33 @@ class _SmartWatchInstructionsState extends State { ), Container( margin: EdgeInsets.all(10.0), - child: Text( - "Before syncing data, please make sure that following instructions are met: ", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + child: Text("Before syncing data, please make sure that following instructions are met: ", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), ), Container( margin: EdgeInsets.all(10.0), - child: Text( - "1. Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore.", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + child: Text("1. Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore.", + textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), ), Container( margin: EdgeInsets.all(10.0), - child: Text( - "2. Make sure that you have installed your watch related apps from Google PlayStore.", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + child: Text("2. Make sure that you have installed your watch related apps from Google PlayStore.", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), ), Container( margin: EdgeInsets.all(10.0), - child: Text( - "3. Make sure that your Smart Watch is connected with the WearOS app & your watch apps.", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + child: + Text("3. Make sure that your Smart Watch is connected with the WearOS app & your watch apps.", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), ), Container( margin: EdgeInsets.all(10.0), - child: Text( - "4. Make sure that your smart watch apps are linked/associated with Google Fit App.", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + child: Text("4. Make sure that your smart watch apps are linked/associated with Google Fit App.", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), ), Container( - margin: EdgeInsets.fromLTRB( - 15.0, 75.0, 15.0, 15.0), + margin: EdgeInsets.fromLTRB(15.0, 75.0, 15.0, 15.0), child: ButtonTheme( shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(10.0), + borderRadius: BorderRadius.circular(10.0), ), - minWidth: - MediaQuery.of(context).size.width, + minWidth: MediaQuery.of(context).size.width, height: 45.0, child: RaisedButton( color: new Color(0xFF60686b), @@ -792,36 +578,33 @@ class _SmartWatchInstructionsState extends State { onPressed: () { buttonCarouselController.nextPage(); }, - child: Text("SYNC HEALTH DATA", - style: TextStyle(fontSize: 18.0)), + child: Text("SYNC HEALTH DATA", style: TextStyle(fontSize: 18.0)), ), ), ), - hasAlreadySynced ? Container( - margin: EdgeInsets.fromLTRB( - 15.0, 0.0, 15.0, 15.0), - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: - BorderRadius.circular(10.0), - ), - minWidth: - MediaQuery.of(context).size.width, - height: 45.0, - child: RaisedButton( - color: new Color(0xFF60686b), - textColor: Colors.white, - elevation: 0, - disabledTextColor: Colors.white, - disabledColor: new Color(0xFFbcc2c4), - onPressed: () { - _openHealthDataList(); - }, - child: Text("ALREADY SYNCED", - style: TextStyle(fontSize: 18.0)), - ), - ), - ) : Container(), + hasAlreadySynced + ? Container( + margin: EdgeInsets.fromLTRB(15.0, 0.0, 15.0, 15.0), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: MediaQuery.of(context).size.width, + height: 45.0, + child: RaisedButton( + color: new Color(0xFF60686b), + textColor: Colors.white, + elevation: 0, + disabledTextColor: Colors.white, + disabledColor: new Color(0xFFbcc2c4), + onPressed: () { + _openHealthDataList(); + }, + child: Text("ALREADY SYNCED", style: TextStyle(fontSize: 18.0)), + ), + ), + ) + : Container(), ], ), )); diff --git a/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart b/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart index c1be5f2d..5f63c2ad 100644 --- a/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart +++ b/lib/pages/medical/smart_watch_health_data/steps/stepsTracker.dart @@ -89,7 +89,7 @@ class _StepsTrackerState extends State with SingleTickerProviderSt ), tabs: [ Tab(text: TranslationBase.of(context).weekly), - Tab(text: TranslationBase.of(context).monthly), + Tab(text: TranslationBase.of(context).monthlyTab), Tab(text: TranslationBase.of(context).yearly), ], onTap: (value) { diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index d61b4f10..e82c6521 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2484,7 +2484,9 @@ class TranslationBase { String get mostViewed => localizedValues["mostViewed"][locale.languageCode]; String get newProducts => localizedValues["newProducts"][locale.languageCode]; + String get enterDetails => localizedValues["enterDetails"][locale.languageCode]; + String get paymentSelected => localizedValues["paymentSelected"][locale.languageCode]; String get moreNotifications => localizedValues["moreNotifications"][locale.languageCode]; @@ -2530,6 +2532,26 @@ class TranslationBase { String get avgDistance => localizedValues["avgDistance"][locale.languageCode]; String get avgHeartRate => localizedValues["avgHeartRate"][locale.languageCode]; + + String get alreadySynced => localizedValues["alreadySynced"][locale.languageCode]; + + String get syncInstructionsIntro1 => localizedValues["sync-instructions-intro1"][locale.languageCode]; + + String get syncInstructionsIntro2 => localizedValues["sync-instructions-intro2"][locale.languageCode]; + + String get syncInstructionsIntro3 => localizedValues["sync-instructions-intro3"][locale.languageCode]; + + String get iosInstructions1 => localizedValues["ios-instructions-1"][locale.languageCode]; + + String get iosInstructions2 => localizedValues["ios-instructions-2"][locale.languageCode]; + + String get iosInstructions3 => localizedValues["ios-instructions-3"][locale.languageCode]; + + String get supportedWatches => localizedValues["supportedWatches"][locale.languageCode]; + + String get watchInstructions => localizedValues["watchInstructions"][locale.languageCode]; + + String get monthlyTab => localizedValues["monthlyTab"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate {