diff --git a/lib/core/viewModels/project_view_model.dart b/lib/core/viewModels/project_view_model.dart index 238ee0f5..47429e52 100644 --- a/lib/core/viewModels/project_view_model.dart +++ b/lib/core/viewModels/project_view_model.dart @@ -31,8 +31,8 @@ class ProjectViewModel extends BaseViewModel { } AppSharedPreferences sharedPref = AppSharedPreferences(); - Locale _appLocale = Locale('ar'); - String currentLanguage = 'ar'; + Locale _appLocale = Locale('en'); + String currentLanguage = 'en'; bool _isArabic = true; bool isInternetConnection = true; bool isLoading = false; diff --git a/lib/main.dart b/lib/main.dart index cd2aab7a..65af6c68 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -164,7 +164,8 @@ class _MyApp extends State { navigatorKey: locator().navigatorKey, showSemanticsDebugger: false, title: 'Dr. AlHabib', - locale: projectProvider.appLocal, + // locale: projectProvider.appLocal, + locale: Locale('en'), localizationsDelegates: [ TranslationBaseDelegate(), GlobalMaterialLocalizations.delegate, diff --git a/lib/pages/landing/home_page_2.dart b/lib/pages/landing/home_page_2.dart index f4a0c69e..31ed8b0d 100644 --- a/lib/pages/landing/home_page_2.dart +++ b/lib/pages/landing/home_page_2.dart @@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/uitl/app_shared_preferences.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/vital_signs/GenderSelector.dart'; import 'package:diplomaticquarterapp/vital_signs/vital_sign.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -79,145 +80,114 @@ class _HomePageState2 extends State { ], ), ), - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - SvgPicture.asset( - 'assets/images/new/cloud_logo.svg', - width: 80, - height: 80, - ), - // mHeight(48.0), - Column( + child: Stack( + children: [ + SvgPicture.asset("assets/images/HealthSnap/background.svg", height: MediaQuery.sizeOf(context).height,width: MediaQuery.sizeOf(context).width), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 16), + child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - "Welcome To", - style: TextStyle(color: Color(0XFF2B353E), fontSize: 22, letterSpacing: 1.28, fontWeight: FontWeight.normal), - ), - Text( - "HealthSnap", - style: TextStyle(color: Color(0XFF2B353E), fontSize: 26, letterSpacing: 1.28, fontWeight: FontWeight.bold), + SvgPicture.asset( + 'assets/images/new/cloud_logo.svg', + width: 80, + height: 80, ), - mHeight(8.0), - Container( - padding: EdgeInsets.only(left: 6, right: 6), - child: Row( - children: [ - Flexible( - child: Row( - children: [ - Radio( - value: TranslationBase.of(context).male, - groupValue: radioValue, - onChanged: (v) { - setState(() { - radioValue = v!; - }); - }, - ), - Text( - TranslationBase.of(context).male, - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), - ), - ], + mHeight(96.0), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Welcome To", + style: TextStyle(color: Color(0XFF2B353E), fontSize: 22, letterSpacing: 1.28, fontWeight: FontWeight.normal), + ), + Text( + "HealthSnap", + style: TextStyle(color: Color(0XFF2B353E), fontSize: 26, letterSpacing: 1.28, fontWeight: FontWeight.bold), + ), + mHeight(84.0), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + GenderSelector(vectorUrl: 'assets/images/HealthSnap/female.svg', isSelected: radioValue == "female", onTap: (){ + setState(() { + radioValue = "female"; + }); + }), + mWidth(24), + GenderSelector(vectorUrl: 'assets/images/HealthSnap/male.svg', isSelected: radioValue == "male", onTap: (){ + setState(() { + radioValue = "male"; + }); + }) + ], + ), + mHeight(64.0), + + Row( + children: [ + Expanded( + child: inputWidget(TranslationBase.of(context).weightAdd + " (kg)", "Enter", weightTextController), ), - ), - Flexible( - child: Row( - children: [ - Radio( - value: TranslationBase.of(context).female, - groupValue: radioValue, - onChanged: (v) { - setState(() { - radioValue = v!; - }); - }, - ), - Text( - TranslationBase.of(context).female, - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - fontWeight: FontWeight.w600, - ), - ), - ], + mWidth(8), + Expanded( + child: inputWidget(TranslationBase.of(context).height + " (cm)", "Enter", heightTextController), ), - ), - ], - ), - ), - Row( - children: [ - Expanded( - child: inputWidget(TranslationBase.of(context).weightAdd + " (kg)", "Enter", weightTextController), + ], ), - mWidth(8), - Expanded( - child: inputWidget(TranslationBase.of(context).height + " (cm)", "Enter", heightTextController), + mHeight(16.0), + inputWidget(TranslationBase.of(context).age, "Enter", ageTextController), + mHeight(16.0), + // inputWidget(TranslationBase.of(context).weightAdd + " (kg)", "Enter", weightTextController), + // mHeight(16.0), + // inputWidget(TranslationBase.of(context).height + " (cm)", "Enter", heightTextController), + // mHeight(16.0), + DefaultButton( + TranslationBase.of(context).start, + (ageTextController.text == "" || weightTextController.text == "" || heightTextController.text == "") + ? null + : () { + final UserInfo userInfo = UserInfo( + age: double.parse(ageTextController.text), + gender: radioValue == "male" ? Gender.male : Gender.female, + weight: double.parse(weightTextController.text), + // kg, Optional + height: double.parse(heightTextController.text), + // cm, Optional + waistCircumference: 0, + // cm Optional + userId: 'dbd13e86-47f4-4a43-85f6-cf62fa750117'); + Navigator.push(context, FadePage(page: VitalSigns(userInfo: userInfo))); + }, + color: Color(0XFF2B353E), + disabledColor: CustomColors.grey, ), ], ), - mHeight(16.0), - inputWidget(TranslationBase.of(context).age, "Enter", ageTextController), - mHeight(16.0), - // inputWidget(TranslationBase.of(context).weightAdd + " (kg)", "Enter", weightTextController), - // mHeight(16.0), - // inputWidget(TranslationBase.of(context).height + " (cm)", "Enter", heightTextController), - // mHeight(16.0), - DefaultButton( - TranslationBase.of(context).start, - (ageTextController.text == "" || weightTextController.text == "" || heightTextController.text == "") - ? null - : () { - final UserInfo userInfo = UserInfo( - age: double.parse(ageTextController.text), - gender: radioValue == TranslationBase.of(context).male ? Gender.male : Gender.female, - weight: double.parse(weightTextController.text), - // kg, Optional - height: double.parse(heightTextController.text), - // cm, Optional - waistCircumference: 0, - // cm Optional - userId: 'dbd13e86-47f4-4a43-85f6-cf62fa750117'); - Navigator.push(context, FadePage(page: VitalSigns(userInfo: userInfo))); - }, - color: Color(0XFF2B353E), - disabledColor: CustomColors.grey, - ), + // HomePageFragment2( + // model, + // onLoginClick: () { + // widget.onLoginClick!(); + // // FirebaseCrashlytics.instance.crash(); + // // Navigator.pushNamed( + // // context, + // // "zoom_call_page", + // // arguments: CallArguments("h9qkpf02", "123", "Patient", "40", "1", false), + // // ); + // }, + // onPharmacyClick: () { + // // getPharmacyToken(model); + // Uri uri = Uri.parse(PHARMACY_REDIRECT_URL); + // launchUrl(uri, mode: LaunchMode.externalApplication); + // }, + // onMedicalFileClick: () { + // widget.onMedicalFileClick!(); + // }, + // ) ], ), - // HomePageFragment2( - // model, - // onLoginClick: () { - // widget.onLoginClick!(); - // // FirebaseCrashlytics.instance.crash(); - // // Navigator.pushNamed( - // // context, - // // "zoom_call_page", - // // arguments: CallArguments("h9qkpf02", "123", "Patient", "40", "1", false), - // // ); - // }, - // onPharmacyClick: () { - // // getPharmacyToken(model); - // Uri uri = Uri.parse(PHARMACY_REDIRECT_URL); - // launchUrl(uri, mode: LaunchMode.externalApplication); - // }, - // onMedicalFileClick: () { - // widget.onMedicalFileClick!(); - // }, - // ) - ], - ), + ), + ], ), ), ), @@ -307,15 +277,15 @@ class _HomePageState2 extends State { prefixIcon: prefix == null ? null : Text( - "+" + prefix, - style: TextStyle( - fontSize: 14, - height: 21 / 14, - fontWeight: FontWeight.w500, - color: Color(0xff2E303A), - letterSpacing: -0.56, - ), - ), + "+" + prefix, + style: TextStyle( + fontSize: 14, + height: 21 / 14, + fontWeight: FontWeight.w500, + color: Color(0xff2E303A), + letterSpacing: -0.56, + ), + ), contentPadding: EdgeInsets.zero, border: InputBorder.none, focusedBorder: InputBorder.none, @@ -331,4 +301,4 @@ class _HomePageState2 extends State { ), ); } -} +} \ No newline at end of file diff --git a/lib/vital_signs/GenderSelector.dart b/lib/vital_signs/GenderSelector.dart new file mode 100644 index 00000000..8a60e98d --- /dev/null +++ b/lib/vital_signs/GenderSelector.dart @@ -0,0 +1,42 @@ +import 'package:diplomaticquarterapp/theme/colors.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class GenderSelector extends StatelessWidget{ + + final String vectorUrl; + final bool isSelected; + final VoidCallback onTap; + + const GenderSelector({super.key, required this.vectorUrl, required this.isSelected, required this.onTap}); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: (){ + onTap(); + }, + behavior: HitTestBehavior.opaque, + child: SizedBox( + height: 120,width: 120, + child: Material( + shape: RoundedRectangleBorder( + side: isSelected?BorderSide(width: 5, color: CustomColors.accentColor): BorderSide.none, + borderRadius: BorderRadius.circular(100), + ), + child: Material( + color: Colors.white, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(100), + ), + child: Padding( + padding: const EdgeInsets.all(22.0), + child: SvgPicture.asset(vectorUrl, ), + ), + ), + ), + ), + ); + } + +} \ No newline at end of file diff --git a/lib/vital_signs/result_screen.dart b/lib/vital_signs/result_screen.dart index 6178f233..148df8e1 100644 --- a/lib/vital_signs/result_screen.dart +++ b/lib/vital_signs/result_screen.dart @@ -49,257 +49,252 @@ class ResultScreen extends StatelessWidget { ), ), ], - body: Padding( - padding: const EdgeInsets.all(15), - child: ListView( - shrinkWrap: true, - children: [ - Expanded( - child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ - if (_holisticAnalysis != null && _holisticAnalysis?.generalWellness != null) - VitalSignWidget( - textColor: textColor, - lookupValues: vitalValues['generalWellness']!, - vitalSignName: TranslationBase.of(context).generalWellness, - condition: RangeConditionWithTitle.fromJson(vital['generalWellness']!, formatValueToTwoDp(healthResult?.holisticHealth?.generalWellness)), - vitalSignValue: formatValueToTwoDp(healthResult?.holisticHealth?.generalWellness), - vectorUrl: 'assets/images/svg/wellness.svg', - vitalName: "generalWellness", - ), //wellness - if (_vitalSign?.stress != null) - VitalSignWidget( - textColor: textColor, - vitalSignName: TranslationBase.of(context).stress, - condition: RangeConditionWithTitle.fromJson(vital['stressLevel']!, formatValueToTwoDp(healthResult?.vitalSigns.stress)), - lookupValues: vitalValues['stressLevel']!, - vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.stress), - vectorUrl: 'assets/images/svg/stress.svg', - vitalName: "stressLevel", - ), - VitalSignWidget( - textColor: textColor, - vitalSignName: TranslationBase.of(context).pulseTitle, - condition: RangeConditionWithTitle.fromJson(vital['HR']!, formatValueToTwoDp(healthResult?.vitalSigns.heartRate)), - lookupValues: vitalValues['HR']!, - vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.heartRate), + body: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.all(15), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + if (_holisticAnalysis != null && _holisticAnalysis?.generalWellness != null) + VitalSignWidget( + textColor: textColor, + lookupValues: vitalValues['generalWellness']!, + vitalSignName: TranslationBase.of(context).generalWellness, + condition: RangeConditionWithTitle.fromJson(vital['generalWellness']!, formatValueToTwoDp(healthResult?.holisticHealth?.generalWellness)), + vitalSignValue: formatValueToTwoDp(healthResult?.holisticHealth?.generalWellness), + vectorUrl: 'assets/images/svg/wellness.svg', + vitalName: "generalWellness", + ), //wellness + if (_vitalSign?.stress != null) + VitalSignWidget( + textColor: textColor, + vitalSignName: TranslationBase.of(context).stress, + condition: RangeConditionWithTitle.fromJson(vital['stressLevel']!, formatValueToTwoDp(healthResult?.vitalSigns.stress)), + lookupValues: vitalValues['stressLevel']!, + vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.stress), + vectorUrl: 'assets/images/svg/stress.svg', + vitalName: "stressLevel", + ), + VitalSignWidget( + textColor: textColor, + vitalSignName: TranslationBase.of(context).pulseTitle, + condition: RangeConditionWithTitle.fromJson(vital['HR']!, formatValueToTwoDp(healthResult?.vitalSigns.heartRate)), + lookupValues: vitalValues['HR']!, + vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.heartRate), + vectorUrl: 'assets/images/svg/heartrate.svg', + vitalName: "HR", + ), + //heart rate + if (_vitalSign?.bloodPressure != null) + VitalSignWidget( + textColor: textColor, + vitalSignName: "Blood Pressure", + condition: RangeConditionForBloodPressure.fromJson(vital['blood_pressure']!, healthResult?.vitalSigns.bloodPressure ?? ""), + bloodPressureValues: vitalValues['blood_pressure']!, + vitalSignValue: healthResult?.vitalSigns.bloodPressure ?? "", + vectorUrl: 'assets/images/svg/bloodpressure.svg', + vitalName: "blood_pressure", + ), + if (_vitalSign?.hrvSdnn != null) + VitalSignWidget( vectorUrl: 'assets/images/svg/heartrate.svg', - vitalName: "HR", - ), - //heart rate - if (_vitalSign?.bloodPressure != null) - VitalSignWidget( - textColor: textColor, - vitalSignName: "Blood Pressure", - condition: RangeConditionForBloodPressure.fromJson(vital['blood_pressure']!, healthResult?.vitalSigns.bloodPressure ?? ""), - bloodPressureValues: vitalValues['blood_pressure']!, - vitalSignValue: healthResult?.vitalSigns.bloodPressure ?? "", - vectorUrl: 'assets/images/svg/bloodpressure.svg', - vitalName: "blood_pressure", - ), - if (_vitalSign?.hrvSdnn != null) - VitalSignWidget( - vectorUrl: 'assets/images/svg/heartrate.svg', - textColor: textColor, - vitalSignName: "HRV SDNN", - lookupValues: vitalValues['hrvv']!, - condition: RangeConditionWithTitle.fromJson(vital['hrvv']!, formatValueToTwoDp(healthResult?.vitalSigns.hrvSdnn)), - vitalName: "hrvv", - vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.hrvSdnn)), - - //oxygen - VitalSignWidget( textColor: textColor, - lookupValues: vitalValues['Sp02']!, - vitalName: "Sp02", - vitalSignName: TranslationBase.of(context).oxygenSaturation, - condition: RangeConditionWithTitle.fromJson(vital['Sp02']!, formatValueToTwoDp(healthResult?.vitalSigns.spo2)), - vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.spo2), - vectorUrl: 'assets/images/svg/oxygen.svg', - ), - if (_vitalSign?.respiratoryRate != null) - VitalSignWidget( - textColor: textColor, - lookupValues: vitalValues['respiratoryRate']!, - vitalName: "respiratoryRate", - vitalSignName: TranslationBase.of(context).respiratoryRate, - condition: RangeConditionWithTitle.fromJson(vital['respiratoryRate']!, formatValueToTwoDp(healthResult?.vitalSigns.respiratoryRate)), - vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.respiratoryRate), - vectorUrl: 'assets/images/svg/breathing.svg', - ), - if (_holisticAnalysis != null && _holisticAnalysis?.bmi != null) - VitalSignWidget( - textColor: textColor, - lookupValues: vitalValues['bmi']!, - vitalName: "bmi", - vitalSignName: TranslationBase.of(context).BMI, - condition: RangeConditionWithTitle.fromJson(vital['bmi']!, formatValueToTwoDp(healthResult?.holisticHealth?.bmi)), - vitalSignValue: formatValueToTwoDp(healthResult?.holisticHealth?.bmi), - vectorUrl: 'assets/images/svg/bmi.svg', - ), - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "IBI", - // condition: RangeConditionWithTitle.fromJson(vital['HR']!), - // vitalSignValue: - // formatValueToTwoDp(healthResult?.vitalSigns.ibi)), + vitalSignName: "HRV SDNN", + lookupValues: vitalValues['hrvv']!, + condition: RangeConditionWithTitle.fromJson(vital['hrvv']!, formatValueToTwoDp(healthResult?.vitalSigns.hrvSdnn)), + vitalName: "hrvv", + vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.hrvSdnn)), - // if (_vitalSign?.hrvRmssd != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "HRV RMSSD", - // vitalSignValue: formatValueToTwoDp( - // healthResult?.vitalSigns.hrvRmssd)), + //oxygen + VitalSignWidget( + textColor: textColor, + lookupValues: vitalValues['Sp02']!, + vitalName: "Sp02", + vitalSignName: TranslationBase.of(context).oxygenSaturation, + condition: RangeConditionWithTitle.fromJson(vital['Sp02']!, formatValueToTwoDp(healthResult?.vitalSigns.spo2)), + vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.spo2), + vectorUrl: 'assets/images/svg/oxygen.svg', + ), + if (_vitalSign?.respiratoryRate != null) + VitalSignWidget( + textColor: textColor, + lookupValues: vitalValues['respiratoryRate']!, + vitalName: "respiratoryRate", + vitalSignName: TranslationBase.of(context).respiratoryRate, + condition: RangeConditionWithTitle.fromJson(vital['respiratoryRate']!, formatValueToTwoDp(healthResult?.vitalSigns.respiratoryRate)), + vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.respiratoryRate), + vectorUrl: 'assets/images/svg/breathing.svg', + ), + if (_holisticAnalysis != null && _holisticAnalysis?.bmi != null) + VitalSignWidget( + textColor: textColor, + lookupValues: vitalValues['bmi']!, + vitalName: "bmi", + vitalSignName: TranslationBase.of(context).BMI, + condition: RangeConditionWithTitle.fromJson(vital['bmi']!, formatValueToTwoDp(healthResult?.holisticHealth?.bmi)), + vitalSignValue: formatValueToTwoDp(healthResult?.holisticHealth?.bmi), + vectorUrl: 'assets/images/svg/bmi.svg', + ), + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "IBI", + // condition: RangeConditionWithTitle.fromJson(vital['HR']!), + // vitalSignValue: + // formatValueToTwoDp(healthResult?.vitalSigns.ibi)), - // if (_vitalSign?.temperature != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Temperature", - // vitalSignValue: formatValueToTwoDp( - // healthResult?.vitalSigns.temperature)), + // if (_vitalSign?.hrvRmssd != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "HRV RMSSD", + // vitalSignValue: formatValueToTwoDp( + // healthResult?.vitalSigns.hrvRmssd)), - // if (_vitalSign?.bloodPressureSystolic != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Blood Pressure Systolic", - // vitalSignValue: formatValueToTwoDp(healthResult - // ?.vitalSigns.bloodPressureSystolic)), - // if (_vitalSign?.bloodPressureDiastolic != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Blood Pressure Diastolic", - // vitalSignValue: formatValueToTwoDp(healthResult - // ?.vitalSigns.bloodPressureDiastolic)), - // if (_holisticAnalysis != null) - // Container( - // margin: const EdgeInsets.fromLTRB(0, 25, 0, 10), - // child: const Text( - // "Holistic Analysis", - // style: TextStyle( - // fontSize: 15, - // color: Colors.amber, - // fontWeight: FontWeight.bold, - // ), - // ), - // ), + // if (_vitalSign?.temperature != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Temperature", + // vitalSignValue: formatValueToTwoDp( + // healthResult?.vitalSigns.temperature)), - // if (_holisticAnalysis != null && - // _holisticAnalysis?.absi != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "ABSI", - // vitalSignValue: formatValueToTwoDp( - // healthResult?.holisticHealth?.absi)), - // if (_holisticAnalysis != null && - // _holisticAnalysis?.cardiacWorkload != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Cardiac Workload", - // vitalSignValue: formatValueToTwoDp( - // healthResult?.holisticHealth?.cardiacWorkload)), - // if (_holisticAnalysis != null && - // _holisticAnalysis?.pulseRespiratoryQuotient != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Pulse Respiratory Quotient", - // vitalSignValue: formatValueToTwoDp(healthResult - // ?.holisticHealth?.pulseRespiratoryQuotient)), - // if (_holisticAnalysis != null && - // _holisticAnalysis?.waistToHeightRatio != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Waist to Height Ratio", - // vitalSignValue: formatValueToTwoDp(healthResult - // ?.holisticHealth?.waistToHeightRatio)), - // if (_cardiovascularRisks != null) - // Container( - // margin: const EdgeInsets.fromLTRB(0, 25, 0, 10), - // child: const Text( - // "Cardiovascular Risks", - // style: TextStyle( - // fontSize: 15, - // color: Colors.amber, - // fontWeight: FontWeight.bold, - // ), - // ), - // ), - // if (_cardiovascularRisks != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: TranslationBase.of(context).cvd, - // condition: RangeConditionWithTitle.fromJson(vital['cvd']!, formatValueToTwoDp(healthResult - // ?.risks?.cardiovascularRisks?.generalRisk)), - // vitalSignValue: formatValueToTwoDp(healthResult - // ?.risks?.cardiovascularRisks?.generalRisk), - // vectorUrl: 'assets/images/svg/heartrate.svg',), - // if (_cardiovascularRisks != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Congestive Heart Failure", - // vitalSignValue: formatValueToTwoDp(healthResult - // ?.risks - // ?.cardiovascularRisks - // ?.congestiveHeartFailure)), - // if (_cardiovascularRisks != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Coronary Heart Disease", - // vitalSignValue: formatValueToTwoDp(healthResult - // ?.risks - // ?.cardiovascularRisks - // ?.coronaryHeartDisease)), - // if (_cardiovascularRisks != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Intermittent Claudication", - // vitalSignValue: formatValueToTwoDp(healthResult - // ?.risks - // ?.cardiovascularRisks - // ?.intermittentClaudication)), - // if (_cardiovascularRisks != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Stroke", - // vitalSignValue: formatValueToTwoDp(healthResult - // ?.risks?.cardiovascularRisks?.stroke)), - // if (_covidRisk != null) - // Container( - // margin: const EdgeInsets.fromLTRB(0, 25, 0, 10), - // child: const Text( - // "Covid Risks", - // style: TextStyle( - // fontSize: 15, - // color: Colors.amber, - // fontWeight: FontWeight.bold, - // ), - // ), - // ), - // if (_covidRisk != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Risk", - // vitalSignValue: formatValueToTwoDp( - // healthResult?.risks?.covidRisk?.covidRisk)), - // if (_scanParameters != null) - // Container( - // margin: const EdgeInsets.fromLTRB(0, 25, 0, 10), - // child: const Text( - // "Scan Parameters", - // style: TextStyle( - // fontSize: 15, - // color: Colors.amber, - // fontWeight: FontWeight.bold, - // ), - // ), - // ), - // if (_scanParameters != null) - // VitalSignWidget( - // textColor: textColor, - // vitalSignName: "Signal Quality", - // vitalSignValue: formatValueToTwoDp( - // healthResult?.scanParameters?.signalQuality)), - ]), - ), - ], + // if (_vitalSign?.bloodPressureSystolic != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Blood Pressure Systolic", + // vitalSignValue: formatValueToTwoDp(healthResult + // ?.vitalSigns.bloodPressureSystolic)), + // if (_vitalSign?.bloodPressureDiastolic != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Blood Pressure Diastolic", + // vitalSignValue: formatValueToTwoDp(healthResult + // ?.vitalSigns.bloodPressureDiastolic)), + // if (_holisticAnalysis != null) + // Container( + // margin: const EdgeInsets.fromLTRB(0, 25, 0, 10), + // child: const Text( + // "Holistic Analysis", + // style: TextStyle( + // fontSize: 15, + // color: Colors.amber, + // fontWeight: FontWeight.bold, + // ), + // ), + // ), + + // if (_holisticAnalysis != null && + // _holisticAnalysis?.absi != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "ABSI", + // vitalSignValue: formatValueToTwoDp( + // healthResult?.holisticHealth?.absi)), + // if (_holisticAnalysis != null && + // _holisticAnalysis?.cardiacWorkload != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Cardiac Workload", + // vitalSignValue: formatValueToTwoDp( + // healthResult?.holisticHealth?.cardiacWorkload)), + // if (_holisticAnalysis != null && + // _holisticAnalysis?.pulseRespiratoryQuotient != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Pulse Respiratory Quotient", + // vitalSignValue: formatValueToTwoDp(healthResult + // ?.holisticHealth?.pulseRespiratoryQuotient)), + // if (_holisticAnalysis != null && + // _holisticAnalysis?.waistToHeightRatio != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Waist to Height Ratio", + // vitalSignValue: formatValueToTwoDp(healthResult + // ?.holisticHealth?.waistToHeightRatio)), + // if (_cardiovascularRisks != null) + // Container( + // margin: const EdgeInsets.fromLTRB(0, 25, 0, 10), + // child: const Text( + // "Cardiovascular Risks", + // style: TextStyle( + // fontSize: 15, + // color: Colors.amber, + // fontWeight: FontWeight.bold, + // ), + // ), + // ), + // if (_cardiovascularRisks != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: TranslationBase.of(context).cvd, + // condition: RangeConditionWithTitle.fromJson(vital['cvd']!, formatValueToTwoDp(healthResult + // ?.risks?.cardiovascularRisks?.generalRisk)), + // vitalSignValue: formatValueToTwoDp(healthResult + // ?.risks?.cardiovascularRisks?.generalRisk), + // vectorUrl: 'assets/images/svg/heartrate.svg',), + // if (_cardiovascularRisks != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Congestive Heart Failure", + // vitalSignValue: formatValueToTwoDp(healthResult + // ?.risks + // ?.cardiovascularRisks + // ?.congestiveHeartFailure)), + // if (_cardiovascularRisks != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Coronary Heart Disease", + // vitalSignValue: formatValueToTwoDp(healthResult + // ?.risks + // ?.cardiovascularRisks + // ?.coronaryHeartDisease)), + // if (_cardiovascularRisks != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Intermittent Claudication", + // vitalSignValue: formatValueToTwoDp(healthResult + // ?.risks + // ?.cardiovascularRisks + // ?.intermittentClaudication)), + // if (_cardiovascularRisks != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Stroke", + // vitalSignValue: formatValueToTwoDp(healthResult + // ?.risks?.cardiovascularRisks?.stroke)), + // if (_covidRisk != null) + // Container( + // margin: const EdgeInsets.fromLTRB(0, 25, 0, 10), + // child: const Text( + // "Covid Risks", + // style: TextStyle( + // fontSize: 15, + // color: Colors.amber, + // fontWeight: FontWeight.bold, + // ), + // ), + // ), + // if (_covidRisk != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Risk", + // vitalSignValue: formatValueToTwoDp( + // healthResult?.risks?.covidRisk?.covidRisk)), + // if (_scanParameters != null) + // Container( + // margin: const EdgeInsets.fromLTRB(0, 25, 0, 10), + // child: const Text( + // "Scan Parameters", + // style: TextStyle( + // fontSize: 15, + // color: Colors.amber, + // fontWeight: FontWeight.bold, + // ), + // ), + // ), + // if (_scanParameters != null) + // VitalSignWidget( + // textColor: textColor, + // vitalSignName: "Signal Quality", + // vitalSignValue: formatValueToTwoDp( + // healthResult?.scanParameters?.signalQuality)), + ]), ), ), ); diff --git a/pubspec.yaml b/pubspec.yaml index ce02a498..b444911a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -226,7 +226,7 @@ flutter: - assets/payment_options/ - assets/images/new/ - - assets/images/new/HealthSnap/ + - assets/images/HealthSnap/ - assets/images/new/zoom/ - assets/images/new/inpatient/ - assets/images/new/mass/