diff --git a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart index 5e749011..54e8e8c9 100644 --- a/lib/screens/patients/profile/referral/my-referral-patient-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-patient-screen.dart @@ -60,32 +60,41 @@ class MyReferralPatientScreen extends StatelessWidget { ), ...List.generate( model.pendingReferral.length, - (index) => PatientReferralItemWidget( - "${model.pendingReferral[index].patientID}", - patientName: model.pendingReferral[index].patientName, - referralStatus: null, - isReferredTo: false, - isSameBranch: model.pendingReferral[index] - .isReferralDoctorSameBranch, - referralDoctorName: - model.pendingReferral[index].referredByDoctorInfo, - clinicDescription: null, - remark: - model.pendingReferral[index].remarksFromSource, - referredOn: model.pendingReferral[index].referredOn, - answerFromTarget: - model.pendingReferral[index].answerFromTarget, - infoIcon: InkWell( - onTap: () { - Navigator.of(context) - .pushNamed(MY_REFERRAL_DETAIL, arguments: { - 'referral': model.pendingReferral[index] - }); - }, - child: Icon( - Icons.info_outline, - color: Colors.black, - size: 30, + (index) => InkWell( + onTap: () { + Navigator.of(context).pushNamed(MY_REFERRAL_DETAIL, + arguments: { + 'referral': model.pendingReferral[index] + }); + }, + child: PatientReferralItemWidget( + "${model.pendingReferral[index].patientID}", + patientName: + model.pendingReferral[index].patientName, + referralStatus: null, + isReferredTo: false, + isSameBranch: model.pendingReferral[index] + .isReferralDoctorSameBranch, + referralDoctorName: model + .pendingReferral[index].referredByDoctorInfo, + clinicDescription: null, + remark: + model.pendingReferral[index].remarksFromSource, + referredOn: model.pendingReferral[index].referredOn, + answerFromTarget: + model.pendingReferral[index].answerFromTarget, + infoIcon: InkWell( + onTap: () { + Navigator.of(context) + .pushNamed(MY_REFERRAL_DETAIL, arguments: { + 'referral': model.pendingReferral[index] + }); + }, + child: Icon( + Icons.info_outline, + color: Colors.black, + size: 30, + ), ), ), ), diff --git a/lib/widgets/shared/app_expandable_notifier.dart b/lib/widgets/shared/app_expandable_notifier.dart index 4ae87e8a..5e934167 100644 --- a/lib/widgets/shared/app_expandable_notifier.dart +++ b/lib/widgets/shared/app_expandable_notifier.dart @@ -6,49 +6,52 @@ class AppExpandableNotifier extends StatelessWidget { final Widget bodyWid; AppExpandableNotifier({this.headerWid, this.bodyWid}); + @override Widget build(BuildContext context) { return ExpandableNotifier( - child: Padding( - padding: const EdgeInsets.all(10), - child: Card( - clipBehavior: Clip.antiAlias, - child: Column( - children: [ - SizedBox( - child: headerWid, - ), - ScrollOnExpand( - scrollOnExpand: true, - scrollOnCollapse: false, - child: ExpandablePanel( - theme: const ExpandableThemeData( - headerAlignment: ExpandablePanelHeaderAlignment.center, - tapBodyToCollapse: true, + child: Padding( + padding: const EdgeInsets.all(10), + child: Card( + clipBehavior: Clip.antiAlias, + child: Column( + children: [ + SizedBox( + child: headerWid, + ), + ScrollOnExpand( + scrollOnExpand: true, + scrollOnCollapse: false, + child: ExpandablePanel( + theme: const ExpandableThemeData( + headerAlignment: ExpandablePanelHeaderAlignment.center, + tapBodyToCollapse: true, + ), + header: Padding( + padding: EdgeInsets.all(10), + child: Text( + "See Graph Details", + style: TextStyle(fontWeight: FontWeight.bold), + )), + collapsed: Text(''), + expanded: bodyWid, + builder: (_, collapsed, expanded) { + return Padding( + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), + child: Expandable( + collapsed: collapsed, + expanded: expanded, + theme: const ExpandableThemeData(crossFadePoint: 0), + ), + ); + }, ), - header: Padding( - padding: EdgeInsets.all(10), - child: Text( - "See Graph Details", - style: TextStyle(fontWeight: FontWeight.bold), - )), - collapsed: Text(''), - expanded: bodyWid, - builder: (_, collapsed, expanded) { - return Padding( - padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), - child: Expandable( - collapsed: collapsed, - expanded: expanded, - theme: const ExpandableThemeData(crossFadePoint: 0), - ), - ); - }, ), - ), - ], + ], + ), ), ), - )); + initialExpanded: true, + ); } }