|
|
|
@ -31,7 +31,6 @@ class ResultScreen extends StatelessWidget {
|
|
|
|
final deviceSize = MediaQuery.of(context).size;
|
|
|
|
final deviceSize = MediaQuery.of(context).size;
|
|
|
|
const textColor = Color.fromARGB(255, 0, 0, 0);
|
|
|
|
const textColor = Color.fromARGB(255, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
print('the age is ${healthResult?.vitalSigns?.facialSkinAge}');
|
|
|
|
|
|
|
|
return AppScaffold(
|
|
|
|
return AppScaffold(
|
|
|
|
isShowAppBar: true,
|
|
|
|
isShowAppBar: true,
|
|
|
|
appBarTitle: TranslationBase.of(context).result,
|
|
|
|
appBarTitle: TranslationBase.of(context).result,
|
|
|
|
@ -39,53 +38,48 @@ class ResultScreen extends StatelessWidget {
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
showNewAppBarTitle: true,
|
|
|
|
overrideUserLogin: true,
|
|
|
|
overrideUserLogin: true,
|
|
|
|
backgroundColor: Color(0xffF8F8F8),
|
|
|
|
backgroundColor: Color(0xffF8F8F8),
|
|
|
|
|
|
|
|
appBarIcons: [
|
|
|
|
|
|
|
|
Center(
|
|
|
|
|
|
|
|
child: Padding(
|
|
|
|
|
|
|
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
|
|
|
|
|
|
|
child: Text(
|
|
|
|
|
|
|
|
"Scan Quality: ${_scanParameters!.signalQuality.toStringAsFixed(0)}%",
|
|
|
|
|
|
|
|
style: TextStyle(color: Colors.black, fontSize: 14, letterSpacing: -0.68, fontWeight: FontWeight.bold),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
body: Padding(
|
|
|
|
body: Padding(
|
|
|
|
padding: const EdgeInsets.all(15),
|
|
|
|
padding: const EdgeInsets.all(15),
|
|
|
|
child: ListView(
|
|
|
|
child: ListView(
|
|
|
|
shrinkWrap: true,
|
|
|
|
shrinkWrap: true,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
child: Column(
|
|
|
|
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
if (_holisticAnalysis != null && _holisticAnalysis?.generalWellness != null)
|
|
|
|
children: [
|
|
|
|
|
|
|
|
if (_holisticAnalysis != null &&
|
|
|
|
|
|
|
|
_holisticAnalysis?.generalWellness != null)
|
|
|
|
|
|
|
|
VitalSignWidget(
|
|
|
|
VitalSignWidget(
|
|
|
|
textColor: textColor,
|
|
|
|
textColor: textColor,
|
|
|
|
lookupValues: vitalValues['generalWellness']!,
|
|
|
|
lookupValues: vitalValues['generalWellness']!,
|
|
|
|
vitalSignName:
|
|
|
|
vitalSignName: TranslationBase.of(context).generalWellness,
|
|
|
|
TranslationBase.of(context).generalWellness,
|
|
|
|
condition: RangeConditionWithTitle.fromJson(vital['generalWellness']!, formatValueToTwoDp(healthResult?.holisticHealth?.generalWellness)),
|
|
|
|
condition: RangeConditionWithTitle.fromJson(
|
|
|
|
vitalSignValue: formatValueToTwoDp(healthResult?.holisticHealth?.generalWellness),
|
|
|
|
vital['generalWellness']!,
|
|
|
|
|
|
|
|
formatValueToTwoDp(
|
|
|
|
|
|
|
|
healthResult?.holisticHealth?.generalWellness)),
|
|
|
|
|
|
|
|
vitalSignValue: formatValueToTwoDp(
|
|
|
|
|
|
|
|
healthResult?.holisticHealth?.generalWellness),
|
|
|
|
|
|
|
|
vectorUrl: 'assets/images/svg/wellness.svg',
|
|
|
|
vectorUrl: 'assets/images/svg/wellness.svg',
|
|
|
|
),//wellness
|
|
|
|
), //wellness
|
|
|
|
if (_vitalSign?.stress != null)
|
|
|
|
if (_vitalSign?.stress != null)
|
|
|
|
VitalSignWidget(
|
|
|
|
VitalSignWidget(
|
|
|
|
textColor: textColor,
|
|
|
|
textColor: textColor,
|
|
|
|
vitalSignName: TranslationBase.of(context).stress,
|
|
|
|
vitalSignName: TranslationBase.of(context).stress,
|
|
|
|
condition: RangeConditionWithTitle.fromJson(
|
|
|
|
condition: RangeConditionWithTitle.fromJson(vital['stressLevel']!, formatValueToTwoDp(healthResult?.vitalSigns.stress)),
|
|
|
|
vital['stressLevel']!,
|
|
|
|
|
|
|
|
formatValueToTwoDp(
|
|
|
|
|
|
|
|
healthResult?.vitalSigns.stress)),
|
|
|
|
|
|
|
|
lookupValues: vitalValues['stressLevel']!,
|
|
|
|
lookupValues: vitalValues['stressLevel']!,
|
|
|
|
vitalSignValue:
|
|
|
|
vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.stress),
|
|
|
|
formatValueToTwoDp(healthResult?.vitalSigns.stress),
|
|
|
|
|
|
|
|
vectorUrl: 'assets/images/svg/stress.svg',
|
|
|
|
vectorUrl: 'assets/images/svg/stress.svg',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
VitalSignWidget(
|
|
|
|
VitalSignWidget(
|
|
|
|
textColor: textColor,
|
|
|
|
textColor: textColor,
|
|
|
|
vitalSignName: TranslationBase.of(context).pulseTitle,
|
|
|
|
vitalSignName: TranslationBase.of(context).pulseTitle,
|
|
|
|
condition: RangeConditionWithTitle.fromJson(
|
|
|
|
condition: RangeConditionWithTitle.fromJson(vital['HR']!, formatValueToTwoDp(healthResult?.vitalSigns.heartRate)),
|
|
|
|
vital['HR']!,
|
|
|
|
|
|
|
|
formatValueToTwoDp(
|
|
|
|
|
|
|
|
healthResult?.vitalSigns.heartRate)),
|
|
|
|
|
|
|
|
lookupValues: vitalValues['HR']!,
|
|
|
|
lookupValues: vitalValues['HR']!,
|
|
|
|
vitalSignValue: formatValueToTwoDp(
|
|
|
|
vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.heartRate),
|
|
|
|
healthResult?.vitalSigns.heartRate),
|
|
|
|
|
|
|
|
vectorUrl: 'assets/images/svg/heartrate.svg',
|
|
|
|
vectorUrl: 'assets/images/svg/heartrate.svg',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
//heart rate
|
|
|
|
//heart rate
|
|
|
|
@ -93,12 +87,9 @@ class ResultScreen extends StatelessWidget {
|
|
|
|
VitalSignWidget(
|
|
|
|
VitalSignWidget(
|
|
|
|
textColor: textColor,
|
|
|
|
textColor: textColor,
|
|
|
|
vitalSignName: "Blood Pressure",
|
|
|
|
vitalSignName: "Blood Pressure",
|
|
|
|
condition: RangeConditionForBloodPressure.fromJson(
|
|
|
|
condition: RangeConditionForBloodPressure.fromJson(vital['blood_pressure']!, healthResult?.vitalSigns.bloodPressure ?? ""),
|
|
|
|
vital['blood_pressure']!,
|
|
|
|
|
|
|
|
healthResult?.vitalSigns.bloodPressure ?? ""),
|
|
|
|
|
|
|
|
bloodPressureValues: vitalValues['blood_pressure']!,
|
|
|
|
bloodPressureValues: vitalValues['blood_pressure']!,
|
|
|
|
vitalSignValue:
|
|
|
|
vitalSignValue: healthResult?.vitalSigns.bloodPressure ?? "",
|
|
|
|
healthResult?.vitalSigns.bloodPressure ?? "",
|
|
|
|
|
|
|
|
vectorUrl: 'assets/images/svg/bloodpressure.svg',
|
|
|
|
vectorUrl: 'assets/images/svg/bloodpressure.svg',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (_vitalSign?.hrvSdnn != null)
|
|
|
|
if (_vitalSign?.hrvSdnn != null)
|
|
|
|
@ -107,52 +98,34 @@ class ResultScreen extends StatelessWidget {
|
|
|
|
textColor: textColor,
|
|
|
|
textColor: textColor,
|
|
|
|
vitalSignName: "HRV SDNN",
|
|
|
|
vitalSignName: "HRV SDNN",
|
|
|
|
lookupValues: vitalValues['hrvv']!,
|
|
|
|
lookupValues: vitalValues['hrvv']!,
|
|
|
|
condition: RangeConditionWithTitle.fromJson(
|
|
|
|
condition: RangeConditionWithTitle.fromJson(vital['hrvv']!, formatValueToTwoDp(healthResult?.vitalSigns.hrvSdnn)),
|
|
|
|
vital['hrvv']!,
|
|
|
|
vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.hrvSdnn)),
|
|
|
|
formatValueToTwoDp(
|
|
|
|
|
|
|
|
healthResult?.vitalSigns.hrvSdnn)),
|
|
|
|
|
|
|
|
vitalSignValue: formatValueToTwoDp(
|
|
|
|
|
|
|
|
healthResult?.vitalSigns.hrvSdnn)),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//oxygen
|
|
|
|
//oxygen
|
|
|
|
VitalSignWidget(
|
|
|
|
VitalSignWidget(
|
|
|
|
textColor: textColor,
|
|
|
|
textColor: textColor,
|
|
|
|
lookupValues: vitalValues['Sp02']!,
|
|
|
|
lookupValues: vitalValues['Sp02']!,
|
|
|
|
vitalSignName:
|
|
|
|
vitalSignName: TranslationBase.of(context).oxygenSaturation,
|
|
|
|
TranslationBase.of(context).oxygenSaturation,
|
|
|
|
condition: RangeConditionWithTitle.fromJson(vital['Sp02']!, formatValueToTwoDp(healthResult?.vitalSigns.spo2)),
|
|
|
|
condition: RangeConditionWithTitle.fromJson(
|
|
|
|
vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.spo2),
|
|
|
|
vital['Sp02']!,
|
|
|
|
|
|
|
|
formatValueToTwoDp(healthResult?.vitalSigns.spo2)),
|
|
|
|
|
|
|
|
vitalSignValue:
|
|
|
|
|
|
|
|
formatValueToTwoDp(healthResult?.vitalSigns.spo2),
|
|
|
|
|
|
|
|
vectorUrl: 'assets/images/svg/oxygen.svg',
|
|
|
|
vectorUrl: 'assets/images/svg/oxygen.svg',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (_vitalSign?.respiratoryRate != null)
|
|
|
|
if (_vitalSign?.respiratoryRate != null)
|
|
|
|
VitalSignWidget(
|
|
|
|
VitalSignWidget(
|
|
|
|
textColor: textColor,
|
|
|
|
textColor: textColor,
|
|
|
|
lookupValues: vitalValues['respiratoryRate']!,
|
|
|
|
lookupValues: vitalValues['respiratoryRate']!,
|
|
|
|
vitalSignName:
|
|
|
|
vitalSignName: TranslationBase.of(context).respiratoryRate,
|
|
|
|
TranslationBase.of(context).respiratoryRate,
|
|
|
|
condition: RangeConditionWithTitle.fromJson(vital['respiratoryRate']!, formatValueToTwoDp(healthResult?.vitalSigns.respiratoryRate)),
|
|
|
|
condition: RangeConditionWithTitle.fromJson(
|
|
|
|
vitalSignValue: formatValueToTwoDp(healthResult?.vitalSigns.respiratoryRate),
|
|
|
|
vital['respiratoryRate']!,
|
|
|
|
|
|
|
|
formatValueToTwoDp(
|
|
|
|
|
|
|
|
healthResult?.vitalSigns.respiratoryRate)),
|
|
|
|
|
|
|
|
vitalSignValue: formatValueToTwoDp(
|
|
|
|
|
|
|
|
healthResult?.vitalSigns.respiratoryRate),
|
|
|
|
|
|
|
|
vectorUrl: 'assets/images/svg/breathing.svg',
|
|
|
|
vectorUrl: 'assets/images/svg/breathing.svg',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (_holisticAnalysis != null &&
|
|
|
|
if (_holisticAnalysis != null && _holisticAnalysis?.bmi != null)
|
|
|
|
_holisticAnalysis?.bmi != null)
|
|
|
|
|
|
|
|
VitalSignWidget(
|
|
|
|
VitalSignWidget(
|
|
|
|
textColor: textColor,
|
|
|
|
textColor: textColor,
|
|
|
|
lookupValues: vitalValues['bmi']!,
|
|
|
|
lookupValues: vitalValues['bmi']!,
|
|
|
|
vitalSignName: TranslationBase.of(context).BMI,
|
|
|
|
vitalSignName: TranslationBase.of(context).BMI,
|
|
|
|
condition: RangeConditionWithTitle.fromJson(
|
|
|
|
condition: RangeConditionWithTitle.fromJson(vital['bmi']!, formatValueToTwoDp(healthResult?.holisticHealth?.bmi)),
|
|
|
|
vital['bmi']!,
|
|
|
|
vitalSignValue: formatValueToTwoDp(healthResult?.holisticHealth?.bmi),
|
|
|
|
formatValueToTwoDp(
|
|
|
|
|
|
|
|
healthResult?.holisticHealth?.bmi)),
|
|
|
|
|
|
|
|
vitalSignValue: formatValueToTwoDp(
|
|
|
|
|
|
|
|
healthResult?.holisticHealth?.bmi),
|
|
|
|
|
|
|
|
vectorUrl: 'assets/images/svg/bmi.svg',
|
|
|
|
vectorUrl: 'assets/images/svg/bmi.svg',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// VitalSignWidget(
|
|
|
|
// VitalSignWidget(
|
|
|
|
@ -162,7 +135,6 @@ class ResultScreen extends StatelessWidget {
|
|
|
|
// vitalSignValue:
|
|
|
|
// vitalSignValue:
|
|
|
|
// formatValueToTwoDp(healthResult?.vitalSigns.ibi)),
|
|
|
|
// formatValueToTwoDp(healthResult?.vitalSigns.ibi)),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (_vitalSign?.hrvRmssd != null)
|
|
|
|
// if (_vitalSign?.hrvRmssd != null)
|
|
|
|
// VitalSignWidget(
|
|
|
|
// VitalSignWidget(
|
|
|
|
// textColor: textColor,
|
|
|
|
// textColor: textColor,
|
|
|
|
@ -202,7 +174,6 @@ class ResultScreen extends StatelessWidget {
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (_holisticAnalysis != null &&
|
|
|
|
// if (_holisticAnalysis != null &&
|
|
|
|
// _holisticAnalysis?.absi != null)
|
|
|
|
// _holisticAnalysis?.absi != null)
|
|
|
|
// VitalSignWidget(
|
|
|
|
// VitalSignWidget(
|
|
|
|
|