Compare commits
	
		
			14 Commits 
		
	
	
		
			192d617350
			...
			47ce5022d3
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | 47ce5022d3 | 1 month ago | 
|  | 1b652f877d | 1 month ago | 
|  | 938d95cb06 | 1 month ago | 
|  | 989ea9ab3a | 1 month ago | 
|  | 12447cdafb | 1 month ago | 
|  | 32c7608c83 | 1 month ago | 
|  | 6d85227f11 | 1 month ago | 
|  | 8621a525a2 | 1 month ago | 
|  | 7093a26cb8 | 1 month ago | 
|  | 27a0632d6d | 1 month ago | 
|  | 3d1d78ba48 | 1 month ago | 
|  | 8f8c4c7f65 | 1 month ago | 
|  | 28eae0e68e | 1 month ago | 
|  | e7c62a3321 | 1 month ago | 
| @ -0,0 +1,84 @@ | |||||||
|  | import 'package:easy_localization/easy_localization.dart'; | ||||||
|  | import 'package:flutter/material.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/core/app_assets.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/core/app_export.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/core/enums.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/core/utils/date_util.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/features/lab/models/resp_models/patient_lab_orders_response_model.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/theme/colors.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; | ||||||
|  | import 'package:hmg_patient_app_new/widgets/chip/custom_chip_widget.dart'; | ||||||
|  | 
 | ||||||
|  | class LabOrderByTest extends StatelessWidget { | ||||||
|  |   final VoidCallback onTap; | ||||||
|  |   final int index; | ||||||
|  |   final TestDetails? tests; | ||||||
|  |   final bool isLoading; | ||||||
|  |   final bool isExpanded; | ||||||
|  | 
 | ||||||
|  |   const LabOrderByTest({super.key, required this.onTap, this.tests, required this.index, this.isLoading = false, this.isExpanded = false}); | ||||||
|  | 
 | ||||||
|  |   @override | ||||||
|  |   build(BuildContext context) { | ||||||
|  |     return AnimatedContainer( | ||||||
|  |         duration: Duration(milliseconds: 300), | ||||||
|  |         curve: Curves.easeInOut, | ||||||
|  |         margin: EdgeInsets.symmetric(vertical: 8.h), | ||||||
|  |         decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.h, hasShadow: true), | ||||||
|  |         child: InkWell( | ||||||
|  |             onTap: () { | ||||||
|  |               if (!isLoading) { | ||||||
|  |                 onTap(); | ||||||
|  |               } | ||||||
|  |             }, | ||||||
|  |             child: Container( | ||||||
|  |               key: ValueKey<int>(index), | ||||||
|  |               padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 8.h), | ||||||
|  |               child: Column( | ||||||
|  |                 crossAxisAlignment: CrossAxisAlignment.start, | ||||||
|  |                 children: [ | ||||||
|  |                   // ...labOrder!.testDetails!.map((detail) { | ||||||
|  |                   Padding( | ||||||
|  |                     padding: EdgeInsets.only(bottom: 8.h), | ||||||
|  |                     child: '${tests!.description}'.toText14(weight: FontWeight.w500), | ||||||
|  |                   ), | ||||||
|  | 
 | ||||||
|  |                   SizedBox(height: 12.h), | ||||||
|  | 
 | ||||||
|  |                   Row( | ||||||
|  |                     mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||||||
|  |                     children: [ | ||||||
|  |                       AppCustomChipWidget( | ||||||
|  |                         richText: '${"Last Tested:".needTranslation} ${ DateUtil.formatDateToDate(DateUtil.convertStringToDate(tests!.createdOn), false)}'.toText12(isBold: true), | ||||||
|  |                         // chipType: ChipTypeEnum.lightBg, | ||||||
|  |                         backgroundColor: AppColors.greyLightColor, | ||||||
|  |                         textColor: AppColors.textColor, | ||||||
|  |                         // borderRadius: 5, | ||||||
|  | 
 | ||||||
|  |                       ), | ||||||
|  |                       CustomButton( | ||||||
|  |                         icon: AppAssets.view_report_icon, | ||||||
|  |                         iconColor: AppColors.primaryRedColor, | ||||||
|  |                         iconSize: 16.h, | ||||||
|  |                         text: LocaleKeys.viewReport.tr(context: context), | ||||||
|  |                         onPressed: () {}, | ||||||
|  |                         backgroundColor: AppColors.secondaryLightRedColor, | ||||||
|  |                         borderColor: AppColors.secondaryLightRedColor, | ||||||
|  |                         textColor: AppColors.primaryRedColor, | ||||||
|  |                         fontSize: 14, | ||||||
|  |                         fontWeight: FontWeight.bold, | ||||||
|  |                         borderRadius: 12, | ||||||
|  |                         padding: EdgeInsets.fromLTRB(10, 0, 10, 0), | ||||||
|  |                         height: 40.h, | ||||||
|  |                       ), | ||||||
|  |                     ], | ||||||
|  |                   ), | ||||||
|  |                 ], | ||||||
|  |               ), | ||||||
|  |             ))); | ||||||
|  |   } | ||||||
|  | } | ||||||
					Loading…
					
					
				
		Reference in New Issue