merge-update-with-lab-changes
haroon amjad 4 years ago
parent 1fff2dad25
commit 30c6f1dedb

@ -1594,4 +1594,9 @@ const Map localizedValues = {
"supportedWatches": { "en": "Supported SmartWatches", "ar": "الساعات الذكية المدعومة" }, "supportedWatches": { "en": "Supported SmartWatches", "ar": "الساعات الذكية المدعومة" },
"watchInstructions": { "en": "Watch Instructions:", "ar": "تعليمات الساعة:" }, "watchInstructions": { "en": "Watch Instructions:", "ar": "تعليمات الساعة:" },
"monthlyTab": {"en": "Monthly", "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 وكلاهما في حالة مزامنة." },
}; };

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

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

@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
@ -64,7 +65,7 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
// margin: EdgeInsets.only(top: 10.0), // margin: EdgeInsets.only(top: 10.0),
child: CarouselSlider( child: CarouselSlider(
carouselController: buttonCarouselController, carouselController: buttonCarouselController,
options: CarouselOptions(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) { items: [1, 2].map((i) {
return Builder( return Builder(
builder: (BuildContext context) { builder: (BuildContext context) {
@ -338,10 +339,11 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
), ),
child: i == 1 child: i == 1
? Column( ? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text("Supported Smartwatches", style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, fontFamily: "WorkSans")), child: Text(TranslationBase.of(context).supportedWatches, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
), ),
Container( Container(
child: Row( child: Row(
@ -487,124 +489,132 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
launch("https://wearos.google.com/#find-your-watch"); launch("https://wearos.google.com/#find-your-watch");
}, },
child: Container( child: Container(
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0, left: 15.0, right: 15.0),
child: Text("More Supported Smartwatches...", style: TextStyle(fontSize: 17.0, color: Colors.blue, decoration: TextDecoration.underline)), child: Text(TranslationBase.of(context).moreSupportedWatches,
textAlign: TextAlign.center, style: TextStyle(fontSize: 14.0, color: Colors.blue, decoration: TextDecoration.underline, letterSpacing: -0.36)),
), ),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
"It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: child: Text(TranslationBase.of(context).syncInstructionsIntro2, style: TextStyle(fontSize: 14.0, letterSpacing: -0.36)),
Text("Before syncing data, please make sure that you have followed the instructions properly", textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(15.0), margin: EdgeInsets.all(15.0),
child: ButtonTheme( child: DefaultButton(
shape: RoundedRectangleBorder( TranslationBase.of(context).continues,
borderRadius: BorderRadius.circular(10.0), () {
), buttonCarouselController.nextPage();
minWidth: MediaQuery.of(context).size.width, },
height: 45.0, color: CustomColors.green,
child: RaisedButton(
color: new Color(0xFF60686b),
textColor: Colors.white,
elevation: 0,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
buttonCarouselController.nextPage();
},
child: Text("CONTINUE", style: TextStyle(fontSize: 18.0)),
),
), ),
), ),
], ],
) )
: Column( : Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text("Watch Instructions:", style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold, fontFamily: "WorkSans")), child: Text(TranslationBase.of(context).watchInstructions, style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.bold)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text( child: Text(TranslationBase.of(context).syncInstructionsIntro1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
"It Seems like you haven't synced your health data with the Dr. Alhabib App before. To proceed further, you need to sync your health data with the Dr. Alhabib App",
textAlign: TextAlign.center,
style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text("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( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: Text("1. Make sure that you have installed 'WearOS' & 'Google Fit' apps from Google PlayStore.", child: Text(TranslationBase.of(context).androidInstructions1, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
textAlign: TextAlign.center, style: TextStyle(fontSize: 17.0)),
), ),
Container( Container(
margin: EdgeInsets.all(10.0), 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( Container(
margin: EdgeInsets.all(10.0), margin: EdgeInsets.all(10.0),
child: child: Text(TranslationBase.of(context).androidInstructions3, style: TextStyle(fontSize: 14.0, letterSpacing: -0.34)),
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( Container(
margin: EdgeInsets.all(10.0), 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( Padding(
margin: EdgeInsets.fromLTRB(15.0, 75.0, 15.0, 15.0), padding: const EdgeInsets.fromLTRB(12.0, 50.0, 12.0, 20.0),
child: ButtonTheme( child: Row(
shape: RoundedRectangleBorder( children: [
borderRadius: BorderRadius.circular(10.0), Expanded(
), child: DefaultButton(
minWidth: MediaQuery.of(context).size.width, TranslationBase.of(context).syncHealthData,
height: 45.0, () {},
child: RaisedButton( color: Color(0xFFD02127),
color: new Color(0xFF60686b), disabledColor: Color(0xff28323A).withOpacity(0.3),
textColor: Colors.white, ),
elevation: 0, ),
disabledTextColor: Colors.white, mWidth(12),
disabledColor: new Color(0xFFbcc2c4), if (hasAlreadySynced)
onPressed: () { Expanded(
buttonCarouselController.nextPage(); child: DefaultButton(
}, TranslationBase.of(context).alreadySynced,
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(); _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(),
], ],
), ),
)); ));

@ -2552,6 +2552,16 @@ class TranslationBase {
String get watchInstructions => localizedValues["watchInstructions"][locale.languageCode]; String get watchInstructions => localizedValues["watchInstructions"][locale.languageCode];
String get monthlyTab => localizedValues["monthlyTab"][locale.languageCode]; String get monthlyTab => localizedValues["monthlyTab"][locale.languageCode];
String get moreSupportedWatches => localizedValues["moreSupportedWatches"][locale.languageCode];
String get androidInstructions1 => localizedValues["android-instructions-1"][locale.languageCode];
String get androidInstructions2 => localizedValues["android-instructions-2"][locale.languageCode];
String get androidInstructions3 => localizedValues["android-instructions-3"][locale.languageCode];
String get androidInstructions4 => localizedValues["android-instructions-4"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save