@ -89,12 +89,12 @@ class _PrescriptionAiAnalysisDetailedPageState extends State<PrescriptionAiAnaly
}
/ / Important Warnings Section
if ( analysis . important Warning s ! = null & & analysis . important Warning s! . isNotEmpty ) {
if ( analysis . important Note s ! = null & & analysis . important Note s! . isNotEmpty ) {
expandableItems . add (
ExpandableListItem (
backgroundColor: Colors . transparent ,
expandedBackgroundColor: Colors . transparent ,
title: LocaleKeys . importantWarning s. tr ( context: context ) . toText18 ( weight: FontWeight . w700 , color: AppColors . blackColor ) ,
title: LocaleKeys . note s. tr ( context: context ) . toText18 ( weight: FontWeight . w700 , color: AppColors . blackColor ) ,
children: [
SizedBox ( height: 10. h ) ,
SizedBox (
@ -108,14 +108,12 @@ class _PrescriptionAiAnalysisDetailedPageState extends State<PrescriptionAiAnaly
padding: EdgeInsets . all ( 16. r ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: analysis . important Warning s! . map ( ( warning ) {
children: analysis . important Note s! . map ( ( warning ) {
return Padding (
padding: EdgeInsets . only ( bottom: 8. h ) ,
child: Row (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Icon ( Icons . warning_amber_rounded , color: Color ( 0xFFFF5252 ) , size: 18. w ) ,
SizedBox ( width: 8. w ) ,
Expanded ( child: warning . toText14 ( color: AppColors . textColorLight , height: 1.5 , weight: FontWeight . w400 ) ) ,
] ,
) ,
@ -130,73 +128,73 @@ class _PrescriptionAiAnalysisDetailedPageState extends State<PrescriptionAiAnaly
) ;
}
/ / Medicine Interactions Section
if ( analysis . medicineInteractions ! = null & & analysis . medicineInteractions ! . isNotEmpty ) {
expandableItems . add (
ExpandableListItem (
backgroundColor: Colors . transparent ,
expandedBackgroundColor: Colors . transparent ,
title: LocaleKeys . medicineInteractions . tr ( context: context ) . toText18 ( weight: FontWeight . w700 , color: AppColors . blackColor ) ,
children: [
SizedBox ( height: 10. h ) ,
SizedBox (
width: double . infinity ,
child: Container (
decoration: RoundedRectangleBorder ( ) . toSmoothCornerDecoration (
color: AppColors . whiteColor ,
borderRadius: 12. r ,
side: BorderSide ( width: 1 , color: Color ( 0xFFFFAF15 ) ) ,
) ,
padding: EdgeInsets . all ( 16. r ) ,
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: analysis . medicineInteractions ! . map ( ( interaction ) {
return Padding (
padding: EdgeInsets . only ( bottom: 8. h ) ,
child: Row (
crossAxisAlignment: CrossAxisAlignment . start ,
children: [
Icon ( Icons . info_outline , color: Color ( 0xFFFFAF15 ) , size: 18. w ) ,
SizedBox ( width: 8. w ) ,
Expanded ( child: interaction . toText14 ( color: AppColors . textColorLight , height: 1.5 , weight: FontWeight . w400 ) ) ,
] ,
) ,
) ;
} ) . toList ( ) ,
) ,
) ,
) ,
SizedBox ( height: 8. h ) ,
] ,
) ,
) ;
}
/ / if ( analysis . medicineInteractions ! = null & & analysis . medicineInteractions ! . isNotEmpty ) {
/ / expandableItems . add (
/ / ExpandableListItem (
/ / backgroundColor: Colors . transparent ,
/ / expandedBackgroundColor: Colors . transparent ,
/ / title: LocaleKeys . medicineInteractions . tr ( context: context ) . toText18 ( weight: FontWeight . w700 , color: AppColors . blackColor ) ,
/ / children: [
/ / SizedBox ( height: 10. h ) ,
/ / SizedBox (
/ / width: double . infinity ,
/ / child: Container (
/ / decoration: RoundedRectangleBorder ( ) . toSmoothCornerDecoration (
/ / color: AppColors . whiteColor ,
/ / borderRadius: 12. r ,
/ / side: BorderSide ( width: 1 , color: Color ( 0xFFFFAF15 ) ) ,
/ / ) ,
/ / padding: EdgeInsets . all ( 16. r ) ,
/ / child: Column (
/ / crossAxisAlignment: CrossAxisAlignment . start ,
/ / children: analysis . medicineInteractions ! . map ( ( interaction ) {
/ / return Padding (
/ / padding: EdgeInsets . only ( bottom: 8. h ) ,
/ / child: Row (
/ / crossAxisAlignment: CrossAxisAlignment . start ,
/ / children: [
/ / Icon ( Icons . info_outline , color: Color ( 0xFFFFAF15 ) , size: 18. w ) ,
/ / SizedBox ( width: 8. w ) ,
/ / Expanded ( child: interaction . toText14 ( color: AppColors . textColorLight , height: 1.5 , weight: FontWeight . w400 ) ) ,
/ / ] ,
/ / ) ,
/ / ) ;
/ / } ) . toList ( ) ,
/ / ) ,
/ / ) ,
/ / ) ,
/ / SizedBox ( height: 8. h ) ,
/ / ] ,
/ / ) ,
/ / ) ;
/ / }
/ / Follow - up Needed Section
if ( analysis . followUpNeeded ! = null & & analysis . followUpNeeded ! . isNotEmpty ) {
expandableItems . add (
ExpandableListItem (
backgroundColor: Colors . transparent ,
expandedBackgroundColor: Colors . transparent ,
title: LocaleKeys . followUpNeeded . tr ( context: context ) . toText18 ( weight: FontWeight . w700 , color: AppColors . blackColor ) ,
children: [
SizedBox ( height: 10. h ) ,
SizedBox (
width: double . infinity ,
child: Container (
decoration: RoundedRectangleBorder ( ) . toSmoothCornerDecoration (
color: AppColors . whiteColor ,
borderRadius: 12. r ,
side: BorderSide ( width: 1 , color: AppColors . primaryRedColor ) ,
) ,
padding: EdgeInsets . all ( 16. r ) ,
child: ( analysis . followUpNeeded ? ? " " ) . toText14 ( color: AppColors . textColorLight , height: 1.5 , weight: FontWeight . w400 ) ,
) ,
) ,
SizedBox ( height: 8. h ) ,
] ,
) ,
) ;
}
/ / if ( analysis . followUpNeeded ! = null & & analysis . followUpNeeded ! . isNotEmpty ) {
/ / expandableItems . add (
/ / ExpandableListItem (
/ / backgroundColor: Colors . transparent ,
/ / expandedBackgroundColor: Colors . transparent ,
/ / title: LocaleKeys . followUpNeeded . tr ( context: context ) . toText18 ( weight: FontWeight . w700 , color: AppColors . blackColor ) ,
/ / children: [
/ / SizedBox ( height: 10. h ) ,
/ / SizedBox (
/ / width: double . infinity ,
/ / child: Container (
/ / decoration: RoundedRectangleBorder ( ) . toSmoothCornerDecoration (
/ / color: AppColors . whiteColor ,
/ / borderRadius: 12. r ,
/ / side: BorderSide ( width: 1 , color: AppColors . primaryRedColor ) ,
/ / ) ,
/ / padding: EdgeInsets . all ( 16. r ) ,
/ / child: ( analysis . followUpNeeded ? ? " " ) . toText14 ( color: AppColors . textColorLight , height: 1.5 , weight: FontWeight . w400 ) ,
/ / ) ,
/ / ) ,
/ / SizedBox ( height: 8. h ) ,
/ / ] ,
/ / ) ,
/ / ) ;
/ / }
return Column (
children: [
@ -263,12 +261,12 @@ class _PrescriptionAiAnalysisDetailedPageState extends State<PrescriptionAiAnaly
] ,
/ / Common Side Effects
if ( medicine . commonSideEffects ! = null & & medicine . commonSideEffect s! . isNotEmpty ) . . . [
if ( medicine . allergyReactions ! = null & & medicine . allergyReaction s! . isNotEmpty ) . . . [
_buildInfoRow (
icon: Icons . warning_amber_rounded ,
iconColor: Color ( 0xFFFFAF15 ) ,
title: LocaleKeys . commonSideEffect s. tr ( context: context ) ,
content: medicine . commonSideEffect s! . join ( ' , ' ) ,
title: LocaleKeys . AllergyReaction s. tr ( context: context ) ,
content: medicine . allergyReaction s! . join ( ' , ' ) ,
) ,
SizedBox ( height: 12. h ) ,
] ,