import 'package:doctor_app_flutter/core/viewModel/medical_file_view_model.dart'; import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/expandable-widget-header-body.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; class MedicalFileDetails extends StatefulWidget { String age; String firstName; String lastName; String gender; MedicalFileDetails({this.age, this.firstName, this.lastName, this.gender}); @override _MedicalFileDetailsState createState() => _MedicalFileDetailsState( firstName: firstName, age: age, lastName: lastName, gender: gender); } class _MedicalFileDetailsState extends State { String age; String firstName; String lastName; String gender; _MedicalFileDetailsState( {this.age, this.firstName, this.lastName, this.gender}); bool isPhysicalExam = false; bool isProcedureExpand = false; bool isHistoryExpand = false; bool isAssessmentExpand = false; @override Widget build(BuildContext context) { return BaseView( //onModelReady: (model) => model.getMedicalFile(), builder: (BuildContext context, MedicalFileViewModel model, Widget child) => AppScaffold( isShowAppBar: true, appBarTitle: 'medical file'.toUpperCase(), body: SingleChildScrollView( child: Container( child: Column( children: [ Padding( padding: EdgeInsets.all(8.0), child: Row( children: [ AvatarWidget( Icon( gender == "Male" ? DoctorApp.male : DoctorApp.female_icon, size: 70, color: Colors.white, ), ), SizedBox( width: 20, ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( firstName + ' ' + lastName, color: Colors.black, fontWeight: FontWeight.bold, ), Row( children: [ AppText( TranslationBase.of(context).age2, color: Colors.black, fontWeight: FontWeight.bold, ), SizedBox( width: 5.0, ), AppText( age, color: Colors.black, fontWeight: FontWeight.normal, ), ], ), ], ) ], ), ), Divider( height: 1.0, thickness: 1.0, color: Colors.grey, ), Padding( padding: EdgeInsets.all(10.0), child: Container( child: Column( children: [ Row( children: [ AppText( 'Visit Date : ', fontWeight: FontWeight.w700, ), AppText( '23/12/2020', ), SizedBox(width: 35.0), AppText( 'Appt Date : ', fontWeight: FontWeight.w700, ), AppText( '23/12/2020', ), ], ), Row( children: [ AppText( 'Doctor : '.toUpperCase(), fontWeight: FontWeight.w700, ), AppText( 'Muhammad assad'.toUpperCase(), fontWeight: FontWeight.w700, ), ], ), Row( children: [ AppText( 'Clinic : ', fontWeight: FontWeight.w700, ), AppText( 'Gastroenterology', ), ], ), Row( children: [ AppText( 'Episode Number : ', fontWeight: FontWeight.w700, ), AppText( '200012334', ), ], ), SizedBox(height: 15.0), Divider( height: 1.0, thickness: 1.0, color: Colors.grey.shade400, ), SizedBox(height: 25.0), HeaderBodyExpandableNotifier( headerWidget: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ Texts( 'History of present illness' .toUpperCase(), variant: isHistoryExpand ? "bodyText" : '', bold: isHistoryExpand ? true : false, color: Colors.black), ], ), InkWell( onTap: () { setState(() { isHistoryExpand = !isHistoryExpand; }); }, child: Icon(isHistoryExpand ? EvaIcons.minus : EvaIcons.plus)) ], ), bodyWidget: Column( children: [ Texts( 'Ms J. K. is an 83 year old retired nurse with a long history of hypertension that was previously well controlled on diuretic therapy. She was first admitted to CPMC in 1995 when she presented with a complaint of intermittent midsternal chest pain.') ], ), isExpand: isHistoryExpand, ), SizedBox( height: 30, ), Container( width: double.infinity, height: 1, color: Color(0xffCCCCCC), ), SizedBox( height: 30, ), HeaderBodyExpandableNotifier( headerWidget: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ Texts('assessment'.toUpperCase(), variant: isAssessmentExpand ? "bodyText" : '', bold: isAssessmentExpand ? true : false, color: Colors.black), ], ), InkWell( onTap: () { setState(() { isAssessmentExpand = !isAssessmentExpand; }); }, child: Icon(isAssessmentExpand ? EvaIcons.minus : EvaIcons.plus)) ], ), bodyWidget: Column( children: [ Texts('ssss'), ], ), isExpand: isAssessmentExpand, ), SizedBox( height: 30, ), Container( width: double.infinity, height: 1, color: Color(0xffCCCCCC), ), SizedBox( height: 30, ), HeaderBodyExpandableNotifier( headerWidget: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ Texts('Test / procedures'.toUpperCase(), variant: isProcedureExpand ? "bodyText" : '', bold: isProcedureExpand ? true : false, color: Colors.black), ], ), InkWell( onTap: () { setState(() { isProcedureExpand = !isProcedureExpand; }); }, child: Icon(isProcedureExpand ? EvaIcons.minus : EvaIcons.plus)) ], ), bodyWidget: Column( children: [ SizedBox( height: 20.0, ), Row( children: [ AppText( 'Exam Type : ', fontWeight: FontWeight.w700, ), AppText( '59', ), ], ), Row( children: [ AppText( 'ABDOMEN', fontWeight: FontWeight.w700, ), ], ), Row( children: [ AppText( 'Abnormal: ', fontWeight: FontWeight.w700, ), AppText( 'no', ), ], ), SizedBox(height: 15.0), Row( children: [ AppText( 'Some short remark about the allergy', fontWeight: FontWeight.w300, ), ], ), ], ), isExpand: isProcedureExpand, ), SizedBox( height: 30, ), Container( width: double.infinity, height: 1, color: Color(0xffCCCCCC), ), SizedBox( height: 30, ), HeaderBodyExpandableNotifier( headerWidget: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ Texts('physical exam'.toUpperCase(), variant: isPhysicalExam ? "bodyText" : '', bold: isPhysicalExam ? true : false, color: Colors.black), ], ), InkWell( onTap: () { setState(() { isPhysicalExam = !isPhysicalExam; }); }, child: Icon(isPhysicalExam ? EvaIcons.minus : EvaIcons.plus)) ], ), bodyWidget: Column( children: [ SizedBox( height: 20.0, ), Row( children: [ AppText( 'Exam Type : ', fontWeight: FontWeight.w700, ), AppText( '59', ), ], ), Row( children: [ AppText( 'ABDOMEN', fontWeight: FontWeight.w700, ), ], ), Row( children: [ AppText( 'Abnormal: ', fontWeight: FontWeight.w700, ), AppText( 'no', ), ], ), SizedBox(height: 15.0), Row( children: [ AppText( 'Some short remark about the allergy', fontWeight: FontWeight.w300, ), ], ), ], ), isExpand: isPhysicalExam, ), SizedBox( height: 30, ), Container( width: double.infinity, height: 1, color: Color(0xffCCCCCC), ), ], ), ), ), ], ), ), ), ), ); } }