diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index d1f138e4..113f397f 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1594,4 +1594,9 @@ const Map localizedValues = { "supportedWatches": { "en": "Supported SmartWatches", "ar": "الساعات الذكية المدعومة" }, "watchInstructions": { "en": "Watch Instructions:", "ar": "تعليمات الساعة:" }, "monthlyTab": {"en": "Monthly", "ar": "شهري"}, + "moreSupportedWatches": {"en": "More Supported Smartwatches...", "ar": "المزيد من الساعات الذكية المدعومة..."}, + "android-instructions-1": { "en": "Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore.", "ar": "تأكد من تثبيت تطبيقات 'WearOS' و 'Google Fit' من متجر Google PlayStore." }, + "android-instructions-2": { "en": "Make sure that you have installed your watch related apps from Google PlayStore.", "ar": "تأكد من أنك قمت بتثبيت التطبيقات المتعلقة بالساعات من Google PlayStore." }, + "android-instructions-3": { "en": "Make sure that your Smart Watch is connected with the WearOS app & your watch apps.", "ar": "تأكد من أن ساعتك الذكية متصلة بتطبيق WearOS وتطبيقات ساعتك." }, + "android-instructions-4": { "en": "Make sure that your smart watch apps are linked/associated with Google Fit App.", "ar": "تأكد من أن تطبيقات ساعتك الذكية مرتبطة / مرتبطة بتطبيق Google Fit." }, "android-instructions-5": { "en": "Make sure that data like heart rate, steps, distance etc. are being shown on your watch app & on Google Fit app & both are in sync.", "ar": "تأكد من عرض بيانات مثل معدل ضربات القلب والخطوات والمسافة وما إلى ذلك على تطبيق الساعة وعلى تطبيق Google Fit وكلاهما في حالة مزامنة." }, }; diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart index fc3eebb5..6b31b1ba 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page2.dart @@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:geolocator/geolocator.dart'; import 'package:provider/provider.dart'; @@ -89,28 +90,25 @@ class _AllHabibMedicalSevicePage2State extends State child: SingleChildScrollView( child: Column( children: [ - AspectRatio( - aspectRatio: 1.9, - child: Container( - width: double.infinity, - height: double.infinity, - decoration: containerRadiusWithGradient(0, - color1: timeCalculator(6, 0, 10, 59) - ? Color(0xFFB3E3FE) - : timeCalculator(11, 0, 15, 59) - ? Color(0xFFFF9E7E) - : Color(0xFF2E6686), - color2: timeCalculator(6, 0, 10, 59) - ? Color(0xFF9AC7FF) - : timeCalculator(11, 0, 15, 59) - ? Color(0xFFFECB50) - : Color(0xFF122F48)), - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Stack( - alignment: projectViewModel.isArabic ? Alignment.centerLeft : Alignment.centerRight, - children: [ - Column( + Container( + width: double.infinity, + decoration: containerRadiusWithGradient(0, + color1: timeCalculator(6, 0, 10, 59) + ? Color(0xFFB3E3FE) + : timeCalculator(11, 0, 15, 59) + ? Color(0xFFFF9E7E) + : Color(0xFF2E6686), + color2: timeCalculator(6, 0, 10, 59) + ? Color(0xFF9AC7FF) + : timeCalculator(11, 0, 15, 59) + ? Color(0xFFFECB50) + : Color(0xFF122F48)), + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row( + children: [ + Expanded( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Directionality( @@ -134,7 +132,6 @@ class _AllHabibMedicalSevicePage2State extends State color: Colors.white, ), ), - mFlex(0), Text( TranslationBase.of(context).healthWeatherIndicators, style: TextStyle( @@ -172,12 +169,11 @@ class _AllHabibMedicalSevicePage2State extends State ) ], ), - Image.asset( - "assets/images/Weather_ico.png", - color: Colors.white.withOpacity(0.5), - ), - ], - ), + ), + SvgPicture.asset( + "assets/images/new/cloudy.svg", + ), + ], ), ), ), diff --git a/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart index 39264fe8..d85db81f 100644 --- a/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart +++ b/lib/pages/AlHabibMedicalService/health-weather/health-weather-indicator.dart @@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart'; import 'package:diplomaticquarterapp/widgets/weather_slider/weather_slider.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; import 'package:provider/provider.dart'; class HealthWeatherIndicator extends StatefulWidget { @@ -49,28 +50,25 @@ class _HospitalsPageState extends State { body: mode.weatherIndicatorData.length > 0 ? SingleChildScrollView( child: Column(children: [ - AspectRatio( - aspectRatio: 2.3, - child: Container( - width: double.infinity, - height: double.infinity, - decoration: containerRadiusWithGradient(0, - color1: timeCalculator(6, 0, 10, 59) - ? Color(0xFFB3E3FE) - : timeCalculator(11, 0, 15, 59) - ? Color(0xFFFF9E7E) - : Color(0xFF2E6686), - color2: timeCalculator(6, 0, 10, 59) - ? Color(0xFF9AC7FF) - : timeCalculator(11, 0, 15, 59) - ? Color(0xFFFECB50) - : Color(0xFF122F48)), - child: Padding( - padding: const EdgeInsets.all(20.0), - child: Stack( - alignment: projectViewModel.isArabic ? Alignment.centerLeft : Alignment.centerRight, - children: [ - Column( + Container( + width: double.infinity, + decoration: containerRadiusWithGradient(0, + color1: timeCalculator(6, 0, 10, 59) + ? Color(0xFFB3E3FE) + : timeCalculator(11, 0, 15, 59) + ? Color(0xFFFF9E7E) + : Color(0xFF2E6686), + color2: timeCalculator(6, 0, 10, 59) + ? Color(0xFF9AC7FF) + : timeCalculator(11, 0, 15, 59) + ? Color(0xFFFECB50) + : Color(0xFF122F48)), + child: Padding( + padding: const EdgeInsets.all(20.0), + child: Row( + children: [ + Expanded( + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Directionality( @@ -94,7 +92,6 @@ class _HospitalsPageState extends State { color: Colors.white, ), ), - mFlex(0), Text( TranslationBase.of(context).healthWeatherIndicators, style: TextStyle( @@ -115,12 +112,11 @@ class _HospitalsPageState extends State { ), ], ), - Image.asset( - "assets/images/Weather_ico.png", - color: Colors.white.withOpacity(0.5), - ), - ], - ), + ), + SvgPicture.asset( + "assets/images/new/cloudy.svg", + ), + ], ), ), ), 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 4c515e3a..7cc6ab01 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 @@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart'; import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; +import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; @@ -64,7 +65,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.65), items: [1, 2].map((i) { return Builder( builder: (BuildContext context) { @@ -338,10 +339,11 @@ 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, fontFamily: "WorkSans")), + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).supportedWatches, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)), ), Container( child: Row( @@ -487,124 +489,132 @@ class _SmartWatchInstructionsState extends State { launch("https://wearos.google.com/#find-your-watch"); }, child: Container( - margin: EdgeInsets.only(top: 20.0), - child: Text("More Supported Smartwatches...", style: TextStyle(fontSize: 17.0, color: Colors.blue, decoration: TextDecoration.underline)), + margin: EdgeInsets.only(top: 20.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).moreSupportedWatches, + textAlign: TextAlign.center, style: TextStyle(fontSize: 14.0, color: Colors.blue, decoration: TextDecoration.underline, letterSpacing: -0.36)), ), ), Container( margin: EdgeInsets.all(10.0), - child: Text( - "It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), ), Container( margin: EdgeInsets.all(10.0), - child: - Text("Before syncing data, please make sure that you have followed the instructions properly", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), + child: Text(TranslationBase.of(context).syncInstructionsIntro2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)), ), Container( margin: EdgeInsets.all(15.0), - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - minWidth: MediaQuery.of(context).size.width, - height: 45.0, - child: RaisedButton( - color: new Color(0xFF60686b), - textColor: Colors.white, - elevation: 0, - disabledTextColor: Colors.white, - disabledColor: new Color(0xFFbcc2c4), - onPressed: () { - buttonCarouselController.nextPage(); - }, - child: Text("CONTINUE", style: TextStyle(fontSize: 18.0)), - ), + child: DefaultButton( + TranslationBase.of(context).continues, + () { + buttonCarouselController.nextPage(); + }, + color: CustomColors.green, ), ), ], ) : Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - margin: EdgeInsets.only(top: 10.0), - child: Text("Watch Instructions:", style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, fontFamily: "WorkSans")), + margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), + child: Text(TranslationBase.of(context).watchInstructions, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)), ), Container( margin: EdgeInsets.all(10.0), - child: Text( - "It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App", - textAlign: TextAlign.center, - style: TextStyle(fontSize: 17.0)), + child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)), ), Container( margin: EdgeInsets.all(10.0), - child: Text("Before syncing data, please make sure that following instructions are met: ", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), + child: Text(TranslationBase.of(context).syncInstructionsIntro3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)), ), Container( margin: EdgeInsets.all(10.0), - child: Text("1. Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore.", - textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), + child: Text(TranslationBase.of(context).androidInstructions1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)), ), Container( margin: EdgeInsets.all(10.0), - child: Text("2. Make sure that you have installed your watch related apps from Google PlayStore.", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), + child: Text(TranslationBase.of(context).androidInstructions2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)), ), Container( margin: EdgeInsets.all(10.0), - child: - Text("3. Make sure that your Smart Watch is connected with the WearOS app & your watch apps.", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), + child: Text(TranslationBase.of(context).androidInstructions3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)), ), Container( margin: EdgeInsets.all(10.0), - child: Text("4. Make sure that your smart watch apps are linked/associated with Google Fit App.", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)), + child: Text(TranslationBase.of(context).androidInstructions4, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)), ), - Container( - margin: EdgeInsets.fromLTRB(15.0, 75.0, 15.0, 15.0), - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - minWidth: MediaQuery.of(context).size.width, - height: 45.0, - child: RaisedButton( - color: new Color(0xFF60686b), - textColor: Colors.white, - elevation: 0, - disabledTextColor: Colors.white, - disabledColor: new Color(0xFFbcc2c4), - onPressed: () { - buttonCarouselController.nextPage(); - }, - child: Text("SYNC HEALTH DATA", style: TextStyle(fontSize: 18.0)), - ), - ), - ), - 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: () { + 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(); }, - child: Text("ALREADY SYNCED", style: TextStyle(fontSize: 18.0)), + color: Color(0xff359846), ), ), - ) - : Container(), + ], + ), + ), + // Container( + // margin: EdgeInsets.fromLTRB(15.0, 75.0, 15.0, 15.0), + // child: ButtonTheme( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10.0), + // ), + // minWidth: MediaQuery.of(context).size.width, + // height: 45.0, + // child: RaisedButton( + // color: new Color(0xFF60686b), + // textColor: Colors.white, + // elevation: 0, + // disabledTextColor: Colors.white, + // disabledColor: new Color(0xFFbcc2c4), + // onPressed: () { + // buttonCarouselController.nextPage(); + // }, + // child: Text("SYNC HEALTH DATA", style: TextStyle(fontSize: 18.0)), + // ), + // ), + // ), + // hasAlreadySynced + // ? Container( + // margin: EdgeInsets.fromLTRB(15.0, 0.0, 15.0, 15.0), + // child: ButtonTheme( + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10.0), + // ), + // minWidth: MediaQuery.of(context).size.width, + // height: 45.0, + // child: RaisedButton( + // color: new Color(0xFF60686b), + // textColor: Colors.white, + // elevation: 0, + // disabledTextColor: Colors.white, + // disabledColor: new Color(0xFFbcc2c4), + // onPressed: () { + // _openHealthDataList(); + // }, + // child: Text("ALREADY SYNCED", style: TextStyle(fontSize: 18.0)), + // ), + // ), + // ) + // : Container(), ], ), )); diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index e82c6521..c0578bbb 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -2552,6 +2552,16 @@ class TranslationBase { String get watchInstructions => localizedValues["watchInstructions"][locale.languageCode]; String get monthlyTab => localizedValues["monthlyTab"][locale.languageCode]; + + String get moreSupportedWatches => localizedValues["moreSupportedWatches"][locale.languageCode]; + + String get androidInstructions1 => localizedValues["android-instructions-1"][locale.languageCode]; + + String get androidInstructions2 => localizedValues["android-instructions-2"][locale.languageCode]; + + String get androidInstructions3 => localizedValues["android-instructions-3"][locale.languageCode]; + + String get androidInstructions4 => localizedValues["android-instructions-4"][locale.languageCode]; } class TranslationBaseDelegate extends LocalizationsDelegate {