vital sign finalized.

pull/151/head
Sultan khan 3 days ago
parent 34e8386ca1
commit ac0d72b3ff

@ -305,55 +305,64 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Vital Signs".needTranslation.toText16(weight: FontWeight.w500, letterSpacing: -0.2),
Row(
children: [
LocaleKeys.viewAll.tr().toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
SizedBox(width: 2.h),
Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h),
],
),
],
).paddingSymmetrical(0.w, 0.h).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: VitalSignPage(),
),
);
}),
Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Vital Signs".needTranslation.toText16(weight: FontWeight.w500, letterSpacing: -0.2),
Row(
children: [
LocaleKeys.viewAll.tr().toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
SizedBox(width: 2.h),
Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h),
],
),
],
).paddingSymmetrical(0.w, 0.h).onPress(() {
Navigator.of(context).push(
CustomPageRoute(
page: VitalSignPage(),
),
);
}),
),
SizedBox(height: 16.h),
// Make this section dynamic-height (no fixed 160.h)
LayoutBuilder(
builder: (context, constraints) {
if (hmgServicesVM.isVitalSignLoading) {
return _buildVitalSignShimmer();
return Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w),
child: _buildVitalSignShimmer(),
);
}
if (hmgServicesVM.vitalSignList.isEmpty) {
return Container(
padding: EdgeInsets.all(16.w),
width: MediaQuery.of(context).size.width,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 12.r,
hasShadow: false,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.call_for_vitals, width: 32.h, height: 32.h),
SizedBox(height: 12.h),
"No vital signs recorded yet".needTranslation.toText12(isCenter: true),
],
return Padding(
padding: EdgeInsets.symmetric(horizontal: 24.w),
child: Container(
padding: EdgeInsets.all(16.w),
width: MediaQuery.of(context).size.width,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 12.r,
hasShadow: false,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.call_for_vitals, width: 32.h, height: 32.h),
SizedBox(height: 12.h),
"No vital signs recorded yet".needTranslation.toText12(isCenter: true),
],
),
),
);
}
// The cards define their own height; measure the first rendered page once
_scheduleVitalSignMeasure();
final double hostHeight = _vitalSignMeasuredHeight ?? (160.h);
final double hostHeight = _vitalSignMeasuredHeight ?? (135.h);
return SizedBox(
height: hostHeight,
@ -400,7 +409,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
),
],
],
).paddingSymmetrical(24.w, 0.0);
);
}),
SizedBox(height: 16.h),
@ -1394,23 +1403,23 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
).toShimmer(),
SizedBox(height: 16.h),
// Label shimmer
Container(
width: 70.w,
height: 12.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.r),
),
).toShimmer(),
SizedBox(height: 8.h),
// Container(
// width: 70.w,
// height: 12.h,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(4.r),
// ),
// ).toShimmer(),
// SizedBox(height: 8.h),
// Value shimmer (larger)
Container(
width: 60.w,
height: 32.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.r),
),
).toShimmer(),
SizedBox(height: 12.h),
// Container(
// width: 60.w,
// height: 32.h,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(4.r),
// ),
// ).toShimmer(),
// SizedBox(height: 12.h),
// Bottom row with chip and arrow
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -1446,62 +1455,66 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
}) {
return [
// Page 1: BMI + Height
Row(
children: [
Expanded(
child: _buildVitalSignCard(
icon: AppAssets.bmiVital,
label: "BMI",
value: vitalSign.bodyMassIndex?.toString() ?? '--',
unit: '',
status: vitalSign.bodyMassIndex != null ? _getBMIStatus(vitalSign.bodyMassIndex) : null,
onTap: onTap,
Padding(
padding: EdgeInsets.only(left: 24.w),
child: Row(
children: [
Expanded(
child: _buildVitalSignCard(
icon: AppAssets.bmiVital,
label: "BMI",
value: vitalSign.bodyMassIndex?.toString() ?? '--',
unit: '',
status: vitalSign.bodyMassIndex != null ? _getBMIStatus(vitalSign.bodyMassIndex) : null,
onTap: onTap,
),
),
),
SizedBox(width: 12.w),
Expanded(
child: _buildVitalSignCard(
icon: AppAssets.heightVital,
label: "Height",
value: vitalSign.heightCm?.toString() ?? '--',
unit: 'cm',
status: null,
onTap: onTap,
SizedBox(width: 12.w),
Expanded(
child: _buildVitalSignCard(
icon: AppAssets.heightVital,
label: "Height",
value: vitalSign.heightCm?.toString() ?? '--',
unit: 'cm',
status: null,
onTap: onTap,
),
),
),
],
],
),
),
// Page 2: Weight + Blood Pressure
Row(
children: [
Expanded(
child: _buildVitalSignCard(
icon: AppAssets.weightVital,
label: "Weight",
value: vitalSign.weightKg?.toString() ?? '--',
unit: 'kg',
status: vitalSign.weightKg != null ? "Normal" : null,
onTap: onTap,
Padding(padding: EdgeInsets.symmetric(horizontal: 12.w),child: Row(
children: [
Expanded(
child: _buildVitalSignCard(
icon: AppAssets.weightVital,
label: "Weight",
value: vitalSign.weightKg?.toString() ?? '--',
unit: 'kg',
status: vitalSign.weightKg != null ? "Normal" : null,
onTap: onTap,
),
),
),
SizedBox(width: 12.w),
Expanded(
child: _buildVitalSignCard(
icon: AppAssets.bloodPressure,
label: "Blood Pressure",
value: vitalSign.bloodPressureLower != null && vitalSign.bloodPressureHigher != null
? "${vitalSign.bloodPressureHigher}/${vitalSign.bloodPressureLower}"
: '--',
unit: '',
status: _getBloodPressureStatus(
systolic: vitalSign.bloodPressureHigher,
diastolic: vitalSign.bloodPressureLower,
SizedBox(width: 12.w),
Expanded(
child: _buildVitalSignCard(
icon: AppAssets.bloodPressure,
label: "Blood Pressure",
value: vitalSign.bloodPressureLower != null && vitalSign.bloodPressureHigher != null
? "${vitalSign.bloodPressureHigher}/${vitalSign.bloodPressureLower}"
: '--',
unit: '',
status: _getBloodPressureStatus(
systolic: vitalSign.bloodPressureHigher,
diastolic: vitalSign.bloodPressureLower,
),
onTap: onTap,
),
onTap: onTap,
),
),
],
),
],
)),
];
}
@ -1526,7 +1539,6 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
return GestureDetector(
onTap: onTap,
child: Container(
// Same styling used originally for vitals in MedicalFilePage
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 16.r,
@ -1540,15 +1552,15 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row(
children: [
Container(
padding: EdgeInsets.all(10.h),
padding: EdgeInsets.all(8.h),
decoration: BoxDecoration(
color: scheme.iconBg,
borderRadius: BorderRadius.circular(12.r),
),
child: Utils.buildSvgWithAssets(
icon: icon,
width: 20.w,
height: 20.h,
width: 22.w,
height: 22.h,
iconColor: scheme.iconFg,
fit: BoxFit.contain,
),
@ -1563,55 +1575,56 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
],
),
SizedBox(height: 14.h),
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 6.h),
decoration: BoxDecoration(
padding: EdgeInsets.symmetric(horizontal: 6.w, vertical: 6.h),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.bgScaffoldColor,
borderRadius: BorderRadius.circular(10.r),
borderRadius: 10.r,
hasShadow: false,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
value.toText17(
isBold: true,
color: AppColors.textColor,
),
if (unit.isNotEmpty) ...[
SizedBox(width: 3.w),
unit.toText12(
color: AppColors.textColor,
fontWeight: FontWeight.w500,
Flexible(
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: [
Flexible(
child: value.toText17(
isBold: true,
color: AppColors.textColor,
),
),
if (unit.isNotEmpty) ...[
SizedBox(width: 3.w),
unit.toText12(
color: AppColors.textColor,
fontWeight: FontWeight.w500,
),
],
],
],
),
),
if (status != null)
if (status != null) ...[
SizedBox(width: 4.w),
AppCustomChipWidget(
labelText: status,
backgroundColor: scheme.chipBg,
textColor: scheme.chipFg,
)
),
]
else
const SizedBox.shrink(),
AppCustomChipWidget(
labelText: "",
backgroundColor: AppColors.bgScaffoldColor,
textColor:null,
)
],
),
),
SizedBox(height: 8.h),
Align(
alignment: AlignmentDirectional.centerEnd,
child: Utils.buildSvgWithAssets(
icon: AppAssets.arrow_forward,
width: 18.w,
height: 18.h,
iconColor: AppColors.textColorLight,
fit: BoxFit.contain,
),
),
],
),
),

@ -74,7 +74,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
return SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 16.h,
children: [
_headerCard(
context,
@ -85,16 +85,8 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
scheme: scheme,
latestDate: latest?.vitalSignDate,
),
SizedBox(height: 16.h),
_whatIsThisResultCard(context),
SizedBox(height: 16.h),
_historyCard(context, history: history),
SizedBox(height: 16.h),
_nextStepsCard(context),
SizedBox(height: 32.h),
],
).paddingAll(24.h),
);
@ -121,65 +113,71 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8.h,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
padding: EdgeInsets.all(10.h),
decoration: BoxDecoration(
color: scheme.iconBg,
borderRadius: BorderRadius.circular(12.r),
),
child: Utils.buildSvgWithAssets(
icon: icon,
width: 20.w,
height: 20.h,
iconColor: scheme.iconFg,
fit: BoxFit.contain,
),
),
SizedBox(width: 10.w),
title.toText18(isBold: true, weight: FontWeight.w600),
title.toText28(isBold: true, color: AppColors.textColor, letterSpacing: -1),
],
),
if (status != null)
Container(
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 6.h),
decoration: BoxDecoration(
color: scheme.chipBg,
borderRadius: BorderRadius.circular(100.r),
),
child: status.toText11(
color: scheme.chipFg,
weight: FontWeight.w500,
),
SizedBox(height: 8.h),
(latestDate != null
? ('Result of ${latestDate.toString().split(' ').first}'.needTranslation)
: ('Result of --'.needTranslation))
.toText11(weight: FontWeight.w500, color: AppColors.greyTextColor),
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.min,
children: [
Flexible(
child: valueText.toText28(
isBold: true,
color: scheme.iconFg,
letterSpacing: -2,
),
),
SizedBox(width: 4.h),
if (status != null)
Column(
spacing: 6.h,
children: [
status.toText10(weight: FontWeight.w500, color: AppColors.greyTextColor),
Utils.buildSvgWithAssets(
icon: AppAssets.lab_result_indicator,
width: 21,
height: 23,
iconColor: scheme.iconFg,
),
],
),
],
),
),
],
),
SizedBox(height: 10.h),
(
latestDate != null
? ('Result of ${latestDate.toString().split(' ').first}'.needTranslation)
: ('Result of --'.needTranslation)
).toText11(weight: FontWeight.w500, color: AppColors.greyTextColor),
SizedBox(height: 12.h),
valueText.toText28(isBold: true, color: AppColors.textColor, letterSpacing: -2),
if (args.low != null || args.high != null) ...[
SizedBox(height: 8.h),
if (args.low != null || args.high != null)
Text(
_referenceText(context),
style: TextStyle(
fontSize: 12.f,
fontWeight: FontWeight.w500,
fontFamily: 'Poppins',
color: AppColors.greyTextColor,
),
)
]
softWrap: true,
),
],
),
);
@ -208,21 +206,10 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8.h,
children: [
'What is this result?'.needTranslation.toText16(weight: FontWeight.w600),
SizedBox(height: 8.h),
_descriptionText(context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500, maxLine: 10),
SizedBox(height: 12.h),
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.bulb, width: 16.w, height: 16.h, iconColor: AppColors.greyTextColor),
SizedBox(width: 6.w),
Expanded(
child: 'This information is for monitoring and not a diagnosis.'.needTranslation
.toText11(color: AppColors.greyTextColor, weight: FontWeight.w500, maxLine: 3),
),
],
)
'What is this result?'.needTranslation.toText16(weight: FontWeight.w600, color: AppColors.textColor),
_descriptionText(context).toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
],
),
);
@ -235,34 +222,63 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
borderRadius: 24.h,
hasShadow: true,
),
padding: EdgeInsets.all(16.h),
height: _isGraphVisible
? 260.h
: (history.length < 3)
? (history.length * 64) + 80.h
: 260.h,
padding: EdgeInsets.all(15.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
'History flowchart'.needTranslation.toText16(weight: FontWeight.w600),
Text(
_isGraphVisible ? 'History flowchart'.needTranslation : 'History'.needTranslation,
style: TextStyle(
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
color: AppColors.textColor,
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: [
// toggle graph/list similar to lab result details
Utils.buildSvgWithAssets(
icon: _isGraphVisible ? AppAssets.graphIcon : AppAssets.listIcon,
width: 18.w,
height: 18.h,
iconColor: AppColors.greyTextColor,
).onPress(() {
setState(() {
_isGraphVisible = !_isGraphVisible;
});
}),
SizedBox(width: 10.w),
Utils.buildSvgWithAssets(icon: AppAssets.calendarGrey, width: 18.w, height: 18.h, iconColor: AppColors.greyTextColor),
Container(
width: 24.h,
height: 24.h,
alignment: Alignment.center,
child: InkWell(
onTap: () {
setState(() {
_isGraphVisible = !_isGraphVisible;
});
},
child: Utils.buildSvgWithAssets(
icon: _isGraphVisible ? AppAssets.ic_list : AppAssets.ic_graph,
width: 24.h,
height: 24.h,
),
),
),
// SizedBox(width: 16.h),
// Container(
// width: 24.h,
// height: 24.h,
// alignment: Alignment.center,
// child: Utils.buildSvgWithAssets(
// icon: AppAssets.ic_date_filter,
// width: 24.h,
// height: 24.h,
// ),
// ),
],
),
],
),
SizedBox(height: 12.h),
).paddingOnly(bottom: _isGraphVisible ? 16.h : 24.h),
if (history.isEmpty)
Utils.getNoDataWidget(context, noDataText: 'No history available'.needTranslation, isSmallWidget: true)
else if (_isGraphVisible)
@ -277,47 +293,63 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
Widget _buildHistoryGraph(List<DataPoint> history) {
final minY = _minY(history);
final maxY = _maxY(history);
final scheme = VitalSignUiModel.scheme(status: _statusForLatest(null), label: args.title);
return CustomGraph(
dataPoints: history,
makeGraphBasedOnActualValue: true,
leftLabelReservedSize: 40,
showGridLines: true,
showShadow: true,
leftLabelInterval: _leftInterval(history),
maxY: maxY,
minY: minY,
maxX: history.length.toDouble() - .75,
horizontalInterval: .1,
horizontalInterval: _leftInterval(history),
leftLabelFormatter: (value) {
// Match the lab screen behavior: only show High/Low labels.
final v = double.parse(value.toStringAsFixed(1));
if (args.high != null && v == args.high) {
return _axisLabel('High'.needTranslation);
// Show labels at interval points
if (args.high != null && (value - args.high!).abs() < 0.1) {
return _axisLabel('High');
}
if (args.low != null && v == args.low) {
return _axisLabel('Low'.needTranslation);
if (args.low != null && (value - args.low!).abs() < 0.1) {
return _axisLabel('Low');
}
return const SizedBox.shrink();
// Show numeric labels at regular intervals
return _axisLabel(value.toStringAsFixed(0));
},
getDrawingHorizontalLine: (value) {
value = double.parse(value.toStringAsFixed(1));
if ((args.high != null && value == args.high) || (args.low != null && value == args.low)) {
// Draw reference lines for high/low bounds
if (args.high != null && (value - args.high!).abs() < 0.1) {
return FlLine(
color: AppColors.bgGreenColor.withValues(alpha: 0.6),
color: AppColors.bgGreenColor.withOpacity(0.2),
strokeWidth: 1,
dashArray: [5, 5],
);
}
return const FlLine(color: Colors.transparent, strokeWidth: 1);
},
graphColor: AppColors.blackColor,
graphShadowColor: Colors.transparent,
graphGridColor: AppColors.graphGridColor.withValues(alpha: .4),
bottomLabelFormatter: (value, data) {
if (data.isEmpty) return const SizedBox.shrink();
if (value == 0) return _bottomLabel(data[value.toInt()].label);
if (value == data.length - 1) return _bottomLabel(data[value.toInt()].label);
if (value == ((data.length - 1) / 2)) return _bottomLabel(data[value.toInt()].label);
return const SizedBox.shrink();
if (args.low != null && (value - args.low!).abs() < 0.1) {
return FlLine(
color: AppColors.bgGreenColor.withOpacity(0.2),
strokeWidth: 1,
dashArray: [5, 5],
);
}
// Draw grid lines at intervals
return FlLine(
color: AppColors.bgGreenColor.withOpacity(0.2),
strokeWidth: 1,
dashArray: [5, 5],
);
},
graphColor: AppColors.bgGreenColor,
graphShadowColor: AppColors.lightGreenColor.withOpacity(.4),
graphGridColor: scheme.iconFg,
bottomLabelFormatter: (value, data) {
if (data.isEmpty) return const SizedBox.shrink();
if (value == 0) return _bottomLabel(data[value.toInt()].label);
if (value == data.length - 1) return _bottomLabel(data[value.toInt()].label, isLast: true);
if (value == ((data.length - 1) / 2)) return _bottomLabel(data[value.toInt()].label);
return const SizedBox.shrink();
},
rangeAnnotations: _rangeAnnotations(history),
minX: (history.length == 1) ? null : -.2,
scrollDirection: Axis.horizontal,
@ -325,6 +357,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
);
}
Widget _buildHistoryList(BuildContext context, List<DataPoint> history) {
final items = history.reversed.toList();
final height = items.length < 3 ? items.length * 64.0 : 180.h;
@ -393,7 +426,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
HorizontalRangeAnnotation(
y1: minY,
y2: args.low!,
color: AppColors.highAndLow.withValues(alpha: 0.05),
color: AppColors.highAndLow.withOpacity(0.05),
),
);
}
@ -403,7 +436,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
HorizontalRangeAnnotation(
y1: args.low!,
y2: args.high!,
color: AppColors.bgGreenColor.withValues(alpha: 0.05),
color: AppColors.bgGreenColor.withOpacity(0.05),
),
);
}
@ -413,7 +446,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
HorizontalRangeAnnotation(
y1: args.high!,
y2: maxY,
color: AppColors.criticalLowAndHigh.withValues(alpha: 0.05),
color: AppColors.criticalLowAndHigh.withOpacity(0.05),
),
);
}
@ -447,11 +480,14 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
case VitalSignMetric.respiratoryRate:
return _toDouble(v.respirationBeatPerMinute);
case VitalSignMetric.bloodPressure:
// Graph only systolic for now (simple single-series).
// Graph only systolic for now (simple single-series).
return _toDouble(v.bloodPressureHigher);
}
}
const monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
double index = 0;
for (final v in sorted) {
final mv = metricValue(v);
@ -459,7 +495,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
if (mv == 0) continue;
final dt = v.vitalSignDate ?? DateTime.now();
final label = '${dt.day}/${dt.month}';
final label = '${monthNames[dt.month - 1]}, ${dt.year}';
points.add(
DataPoint(
@ -603,18 +639,14 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
);
}
Widget _bottomLabel(String label) {
Widget _bottomLabel(String label, {bool isLast = false}) {
return Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
label,
style: TextStyle(
fontSize: 8.f,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
color: AppColors.labelTextColor,
),
padding: EdgeInsets.only(
top: 8.0,
right: isLast ? 16.h : 0,
),
child: label.toText8(fontWeight: FontWeight.w500),
);
}
}

@ -178,7 +178,7 @@ class _VitalSignPageState extends State<VitalSignPage> {
children: [
// Body anatomy image with Heart Rate card overlaid at bottom
SizedBox(
height: 480.h,
height: 420.h,
width: double.infinity,
child: Stack(
clipBehavior: Clip.none,
@ -196,7 +196,7 @@ class _VitalSignPageState extends State<VitalSignPage> {
Align(
alignment: Alignment.bottomCenter,
child: SizedBox(
height: 420.h,
height: 480.h,
child: ImageFiltered(
imageFilter: ImageFilter.blur(sigmaX: 6, sigmaY: 6),
child: Container(
@ -245,7 +245,7 @@ class _VitalSignPageState extends State<VitalSignPage> {
],
),
),
SizedBox(height: 12.h),
SizedBox(height: 12.h),
// Respiratory rate Card
_buildVitalSignCard(
@ -308,15 +308,15 @@ class _VitalSignPageState extends State<VitalSignPage> {
Row(
children: [
Container(
padding: EdgeInsets.all(10.h),
padding: EdgeInsets.all(8.h),
decoration: BoxDecoration(
color: scheme.iconBg,
borderRadius: BorderRadius.circular(12.r),
),
child: Utils.buildSvgWithAssets(
icon: icon,
width: 20.w,
height: 20.h,
width: 22.w,
height: 22.h,
iconColor: scheme.iconFg,
fit: BoxFit.contain,
),
@ -332,10 +332,15 @@ class _VitalSignPageState extends State<VitalSignPage> {
),
SizedBox(height: 14.h),
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 6.h),
decoration: BoxDecoration(
padding: EdgeInsets.symmetric(horizontal: 6.w, vertical: 6.h),
// decoration: BoxDecoration(
// color: AppColors.bgScaffoldColor,
// borderRadius: BorderRadius.circular(10.r),
// ),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.bgScaffoldColor,
borderRadius: BorderRadius.circular(10.r),
borderRadius: 10.r,
hasShadow: false,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -361,23 +366,24 @@ class _VitalSignPageState extends State<VitalSignPage> {
labelText: status,
backgroundColor: scheme.chipBg,
textColor: scheme.chipFg,
)
else
const SizedBox.shrink(),
],
),
),
SizedBox(height: 8.h),
Align(
alignment: AlignmentDirectional.centerEnd,
child: Utils.buildSvgWithAssets(
icon: AppAssets.arrow_forward,
width: 18.w,
height: 18.h,
iconColor: AppColors.textColorLight,
fit: BoxFit.contain,
),
),
// SizedBox(height: 8.h),
// Align(
// alignment: AlignmentDirectional.centerEnd,
// child: Utils.buildSvgWithAssets(
// icon: AppAssets.arrow_forward,
// width: 18.w,
// height: 18.h,
// iconColor: AppColors.textColorLight,
// fit: BoxFit.contain,
// ),
// ),
],
),
),

Loading…
Cancel
Save