@ -1,6 +1,7 @@
import ' package:doctor_app_flutter/config/size_config.dart ' ;
import ' package:doctor_app_flutter/config/size_config.dart ' ;
import ' package:doctor_app_flutter/models/my_referral_patient_model.dart ' ;
import ' package:doctor_app_flutter/models/my_referral_patient_model.dart ' ;
import ' package:doctor_app_flutter/providers/referral_patient_provider.dart ' ;
import ' package:doctor_app_flutter/providers/referral_patient_provider.dart ' ;
import ' package:doctor_app_flutter/util/dr_app_toast_msg.dart ' ;
import ' package:doctor_app_flutter/util/helpers.dart ' ;
import ' package:doctor_app_flutter/util/helpers.dart ' ;
import ' package:doctor_app_flutter/widgets/shared/Text.dart ' ;
import ' package:doctor_app_flutter/widgets/shared/Text.dart ' ;
import ' package:doctor_app_flutter/widgets/shared/TextFields.dart ' ;
import ' package:doctor_app_flutter/widgets/shared/TextFields.dart ' ;
@ -42,7 +43,7 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
children: < Widget > [
Row (
Row (
mainAxisAlignment: MainAxisAlignment . space Around ,
mainAxisAlignment: MainAxisAlignment . space Between ,
children: < Widget > [
children: < Widget > [
AppText (
AppText (
' ${ widget . myReferralPatientModel . firstName } ${ widget . myReferralPatientModel . lastName } ' ,
' ${ widget . myReferralPatientModel . firstName } ${ widget . myReferralPatientModel . lastName } ' ,
@ -67,13 +68,17 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
child: Column (
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
children: < Widget > [
Column (
SizedBox ( height: 5 , ) ,
crossAxisAlignment: CrossAxisAlignment . start ,
Divider ( color: Color ( 0xFF000000 ) , height: 0.5 , ) ,
children: < Widget > [
Table (
Divider ( color: Colors . grey ) ,
border: TableBorder . symmetric ( inside: BorderSide ( width: 0.5 ) , ) ,
Row (
children: [
children: < Widget > [
TableRow (
children: [
Expanded (
Expanded (
child: Container (
margin: EdgeInsets . all ( 2.5 ) ,
padding: EdgeInsets . all ( 5 ) ,
child: Column (
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
children: < Widget > [
@ -91,15 +96,13 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
)
)
] ,
] ,
) ,
) ,
) ,
) ,
Container (
height: SizeConfig . realScreenWidth * 0.1 ,
width: 0.8 ,
color: Colors . grey ,
margin: EdgeInsets . only ( left: 15 , right: 15 ) ,
) ,
) ,
Expanded (
Expanded (
child: Container (
margin: EdgeInsets . only ( left: 4 , top: 2.5 , right: 2.5 , bottom: 2.5 ) ,
padding: EdgeInsets . all ( 5 ) ,
child: Column (
child: Column (
crossAxisAlignment: CrossAxisAlignment . start ,
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
children: < Widget > [
@ -119,13 +122,15 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
] ,
] ,
) ,
) ,
) ,
) ,
] ,
)
]
) ,
) ,
TableRow (
Divider ( color: Colors . grey ) ,
children: [
Row (
children: < Widget > [
Expanded (
Expanded (
child: Container (
margin: EdgeInsets . all ( 2.5 ) ,
padding: EdgeInsets . all ( 5 ) ,
child: Column (
child: Column (
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment . start ,
CrossAxisAlignment . start ,
@ -145,13 +150,11 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
] ,
] ,
) ,
) ,
) ,
) ,
Container (
height: SizeConfig . realScreenWidth * 0.1 ,
width: 0.8 ,
color: Colors . grey ,
margin: EdgeInsets . only ( left: 15 , right: 15 ) ,
) ,
) ,
Expanded (
Expanded (
child: Container (
margin: EdgeInsets . only ( left: 4 , top: 2.5 , right: 2.5 , bottom: 2.5 ) ,
padding: EdgeInsets . all ( 5 ) ,
child: Column (
child: Column (
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment . start ,
CrossAxisAlignment . start ,
@ -172,12 +175,15 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
] ,
] ,
) ,
) ,
) ,
) ,
] ,
)
]
) ,
) ,
Divider ( color: Colors . grey ) ,
TableRow (
Row (
children: [
children: < Widget > [
Expanded (
Expanded (
child: Container (
margin: EdgeInsets . all ( 2.5 ) ,
padding: EdgeInsets . all ( 5 ) ,
child: Column (
child: Column (
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment . start ,
CrossAxisAlignment . start ,
@ -197,13 +203,11 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
] ,
] ,
) ,
) ,
) ,
) ,
Container (
height: SizeConfig . realScreenWidth * 0.1 ,
width: 0.8 ,
color: Colors . grey ,
margin: EdgeInsets . only ( left: 15 , right: 15 ) ,
) ,
) ,
Expanded (
Expanded (
child: Container (
margin: EdgeInsets . only ( left: 4 , top: 2.5 , right: 2.5 , bottom: 2.5 ) ,
padding: EdgeInsets . all ( 5 ) ,
child: Column (
child: Column (
crossAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment . start ,
CrossAxisAlignment . start ,
@ -225,24 +229,32 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
] ,
] ,
) ,
) ,
) ,
) ,
)
] ,
] ,
) ,
) ,
Divider ( color: Colors . grey ) ,
AppText (
] ,
' Clinic Details and Remarks ' ,
fontSize: 1.7 * SizeConfig . textMultiplier ,
fontWeight: FontWeight . bold ,
textAlign: TextAlign . start ,
) ,
) ,
Divider ( color: Color ( 0xFF000000 ) , height: 0.5 , ) ,
SizedBox (
SizedBox (
height: 5 ,
height: 5 ,
) ,
) ,
Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
AppText (
' Clinic Details and Remarks ' ,
fontSize: 1.7 * SizeConfig . textMultiplier ,
fontWeight: FontWeight . bold ,
textAlign: TextAlign . start , ) ,
Texts (
Texts (
' 73 years old female known case of HTN and dm on regular medication one day prior the patient had rt sided weakness suddenly and reduced level of conscoiusness no vomting no headache no bluriing of vision no other relevant symptoms. \r \n PMH:No history of similar condition no history of surgey or blood transfusions \r \n CT brain was done apparently effaced left insular cortex ' ,
' ${ widget . myReferralPatientModel . referringDoctorRemarks } ' ,
style: " bodyText1 " ,
style: " bodyText1 " ,
readMore: true ,
readMore: true ,
textAlign: TextAlign . start ,
textAlign: TextAlign . start ,
maxLength: 100 ) ,
maxLength: 100 )
] ,
) ,
SizedBox (
SizedBox (
height: 5 ,
height: 5 ,
) ,
) ,
@ -261,6 +273,7 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
maxLines: 2 ,
maxLines: 2 ,
minLines: 2 ,
minLines: 2 ,
hintText: ' Answer the patient ' ,
hintText: ' Answer the patient ' ,
fontWeight: FontWeight . normal ,
initialValue: widget . myReferralPatientModel . referredDoctorRemarks ? ? ' ' ,
initialValue: widget . myReferralPatientModel . referredDoctorRemarks ? ? ' ' ,
readOnly: _isLoading ,
readOnly: _isLoading ,
validator: ( value ) {
validator: ( value ) {
@ -272,35 +285,10 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
) ,
) ,
) ,
) ,
SizedBox ( height: 10.0 ) ,
SizedBox ( height: 10.0 ) ,
if ( error ! = null & & error . isNotEmpty )
Column (
crossAxisAlignment: CrossAxisAlignment . start ,
children: < Widget > [
Container (
decoration: BoxDecoration (
borderRadius: BorderRadius . circular ( 6.0 ) ,
color: Theme . of ( context )
. errorColor
. withOpacity ( 0.06 ) ,
) ,
padding: EdgeInsets . symmetric (
vertical: 8.0 , horizontal: 12.0 ) ,
child: Row (
children: < Widget > [
Expanded (
child: Texts ( error ? ? " " ,
style: " bodyText1 " ,
color: Theme . of ( context )
. errorColor ) ) ,
] ,
) ,
) ,
SizedBox ( height: 10.0 ) ,
] ,
) ,
SizedBox ( height: 10.0 ) ,
SizedBox ( height: 10.0 ) ,
Container (
Container (
width: double . infinity ,
width: double . infinity ,
margin: EdgeInsets . only ( left: 10 , right: 10 ) ,
child: Button (
child: Button (
onTap: ( ) async {
onTap: ( ) async {
final form = _formKey . currentState ;
final form = _formKey . currentState ;
@ -313,11 +301,13 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
setState ( ( ) {
setState ( ( ) {
_isLoading = false ;
_isLoading = false ;
} ) ;
} ) ;
DrAppToastMsg . showSuccesToast ( ' Reply Successfully ' ) ;
} catch ( e ) {
} catch ( e ) {
setState ( ( ) {
setState ( ( ) {
error = e . toString ( ) ;
_isLoading = false ;
_isLoading = false ;
} ) ;
} ) ;
DrAppToastMsg . showErrorToast ( e ) ;
}
}
}
}
} ,
} ,
@ -326,8 +316,6 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
) ,
) ,
)
)
] ,
] ,
)
] ,
) ,
) ,
)
)
] ,
] ,