|
|
|
|
@ -22,7 +22,7 @@ class LabOrderResultItem extends StatelessWidget {
|
|
|
|
|
final bool isExpanded;
|
|
|
|
|
final Color iconColor;
|
|
|
|
|
|
|
|
|
|
const LabOrderResultItem({super.key, required this.onTap, this.tests, required this.index, this.isLoading = false, this.isExpanded = false,required this.iconColor, required this.severityText});
|
|
|
|
|
const LabOrderResultItem({super.key, required this.onTap, this.tests, required this.index, this.isLoading = false, this.isExpanded = false, required this.iconColor, required this.severityText});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
build(BuildContext context) {
|
|
|
|
|
@ -42,7 +42,10 @@ class LabOrderResultItem extends StatelessWidget {
|
|
|
|
|
padding: EdgeInsets.only(bottom: 8.h),
|
|
|
|
|
child: '${tests!.description}'.toText14(weight: FontWeight.w500),
|
|
|
|
|
),
|
|
|
|
|
(tests!.packageShortDescription ?? "").toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
|
|
|
|
|
// (tests!.packageShortDescription ?? "").toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
|
|
|
|
|
|
|
|
|
|
((tests!.testShortDescription != null && tests!.testShortDescription!.isNotEmpty) ? tests!.testShortDescription : tests!.packageShortDescription)!
|
|
|
|
|
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
|
|
|
|
|
SizedBox(height: 12.h),
|
|
|
|
|
Directionality(
|
|
|
|
|
textDirection: ui.TextDirection.ltr,
|
|
|
|
|
@ -65,28 +68,30 @@ class LabOrderResultItem extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(width: 4.h,),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 4.h,
|
|
|
|
|
),
|
|
|
|
|
Visibility(
|
|
|
|
|
// visible: tests?.checkIfGraphShouldBeDisplayed() == true,
|
|
|
|
|
visible: true,
|
|
|
|
|
child: Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
child: Visibility(
|
|
|
|
|
visible: tests?.referanceRange != null,
|
|
|
|
|
child: Text(
|
|
|
|
|
"(${LocaleKeys.referenceRange.tr(context: context)}: ${tests?.referanceRange})",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.f,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
color: AppColors.greyTextColor,
|
|
|
|
|
child: Visibility(
|
|
|
|
|
visible: tests?.referanceRange != null,
|
|
|
|
|
child: Text(
|
|
|
|
|
"(${LocaleKeys.referenceRange.tr(context: context)}: ${tests?.referanceRange})",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.f,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
color: AppColors.greyTextColor,
|
|
|
|
|
),
|
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
|
// maxLines: 2,
|
|
|
|
|
softWrap: true,
|
|
|
|
|
),
|
|
|
|
|
// overflow: TextOverflow.ellipsis,
|
|
|
|
|
// maxLines: 2,
|
|
|
|
|
softWrap: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
@ -102,14 +107,8 @@ class LabOrderResultItem extends StatelessWidget {
|
|
|
|
|
spacing: 6.h,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
severityText.tr().toText10(
|
|
|
|
|
weight: FontWeight.w500,
|
|
|
|
|
color: AppColors.greyTextColor),
|
|
|
|
|
Utils.buildSvgWithAssets(
|
|
|
|
|
icon: AppAssets.lab_result_indicator,
|
|
|
|
|
width: 21,
|
|
|
|
|
height: 23,
|
|
|
|
|
iconColor: iconColor),
|
|
|
|
|
severityText.tr().toText10(weight: FontWeight.w500, color: AppColors.greyTextColor),
|
|
|
|
|
Utils.buildSvgWithAssets(icon: AppAssets.lab_result_indicator, width: 21, height: 23, iconColor: iconColor),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -119,7 +118,7 @@ class LabOrderResultItem extends StatelessWidget {
|
|
|
|
|
iconSize: 16.h,
|
|
|
|
|
text: LocaleKeys.viewReport.tr(context: context),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
onTap();
|
|
|
|
|
onTap();
|
|
|
|
|
},
|
|
|
|
|
backgroundColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
borderColor: AppColors.secondaryLightRedColor,
|
|
|
|
|
|