|  |  | @ -20,8 +20,10 @@ 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/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/app_custom_chip_widget.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; |  |  |  | import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart'; |  |  |  | import 'package:hmg_patient_app_new/widgets/shimmer/movies_shimmer_widget.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | import 'package:provider/provider.dart'; |  |  |  | import 'package:provider/provider.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | import 'package:url_launcher/url_launcher.dart'; | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  | class PrescriptionDetailPage extends StatefulWidget { |  |  |  | class PrescriptionDetailPage extends StatefulWidget { | 
			
		
	
		
		
			
				
					
					|  |  |  |   PrescriptionDetailPage({super.key, required this.prescriptionsResponseModel}); |  |  |  |   PrescriptionDetailPage({super.key, required this.prescriptionsResponseModel}); | 
			
		
	
	
		
		
			
				
					|  |  | @ -59,7 +61,33 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> { | 
			
		
	
		
		
			
				
					
					|  |  |  |           Expanded( |  |  |  |           Expanded( | 
			
		
	
		
		
			
				
					
					|  |  |  |             child: CollapsingListView( |  |  |  |             child: CollapsingListView( | 
			
		
	
		
		
			
				
					
					|  |  |  |               title: LocaleKeys.prescriptions.tr(context: context), |  |  |  |               title: LocaleKeys.prescriptions.tr(context: context), | 
			
		
	
		
		
			
				
					
					|  |  |  |               instructions: () {}, |  |  |  |               instructions: () async { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 LoaderBottomSheet.showLoader(loadingText: "Fetching prescription PDF, Please wait...".needTranslation); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 await prescriptionsViewModel.getPrescriptionInstructionsPDF(widget.prescriptionsResponseModel, onSuccess: (val) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   LoaderBottomSheet.hideLoader(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   if (prescriptionsViewModel.prescriptionInstructionsPDFLink.isNotEmpty) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     Uri uri = Uri.parse(prescriptionsViewModel.prescriptionInstructionsPDFLink); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: ""); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   } else { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     showCommonBottomSheetWithoutHeight( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                       context, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                       child: Utils.getErrorWidget(loadingText: "Unable to fetch PDF".needTranslation), | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                       callBackFunc: () {}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                       isFullScreen: false, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                       isCloseButtonVisible: true, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 }, onError: (err) { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   LoaderBottomSheet.hideLoader(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   showCommonBottomSheetWithoutHeight( | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     context, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     child: Utils.getErrorWidget(loadingText: err), | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     callBackFunc: () {}, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     isFullScreen: false, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                     isCloseButtonVisible: true, | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                   ); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |               }, | 
			
		
	
		
		
			
				
					
					|  |  |  |               child: SingleChildScrollView( |  |  |  |               child: SingleChildScrollView( | 
			
		
	
		
		
			
				
					
					|  |  |  |                 child: Consumer<PrescriptionsViewModel>(builder: (context, prescriptionVM, child) { |  |  |  |                 child: Consumer<PrescriptionsViewModel>(builder: (context, prescriptionVM, child) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                   return Column( |  |  |  |                   return Column( | 
			
		
	
	
		
		
			
				
					|  |  | 
 |