|
|
|
|
@ -11,6 +11,7 @@ import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
|
|
|
|
|
class MyReferralPatientWidget extends StatefulWidget {
|
|
|
|
|
final MyReferralPatientModel myReferralPatientModel;
|
|
|
|
|
@ -31,7 +32,8 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
answerController = new TextEditingController(text: widget.myReferralPatientModel.referredDoctorRemarks ?? '');
|
|
|
|
|
answerController = new TextEditingController(
|
|
|
|
|
text: widget.myReferralPatientModel.referredDoctorRemarks ?? '');
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -59,260 +61,285 @@ class _MyReferralPatientWidgetState extends State<MyReferralPatientWidget> {
|
|
|
|
|
Icon(_showDetails
|
|
|
|
|
? Icons.keyboard_arrow_up
|
|
|
|
|
: Icons.keyboard_arrow_down),
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
!_showDetails
|
|
|
|
|
? Container()
|
|
|
|
|
: AnimatedContainer(
|
|
|
|
|
duration: Duration(milliseconds: 200),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(height: 5,),
|
|
|
|
|
Divider(color: Color(0xFF000000),height: 0.5,),
|
|
|
|
|
Table(
|
|
|
|
|
border: TableBorder.symmetric(inside: BorderSide(width: 0.5),),
|
|
|
|
|
children: [
|
|
|
|
|
TableRow(
|
|
|
|
|
duration: Duration(milliseconds: 200),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
Divider(
|
|
|
|
|
color: Color(0xFF000000),
|
|
|
|
|
height: 0.5,
|
|
|
|
|
),
|
|
|
|
|
Table(
|
|
|
|
|
border: TableBorder.symmetric(
|
|
|
|
|
inside: BorderSide(width: 0.5),
|
|
|
|
|
),
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
'File No',
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 5,),
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.referringDoctor}',
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
TableRow(children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).fileNo,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.referringDoctor}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
'Referring Doctor',
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 5,),
|
|
|
|
|
AppText(
|
|
|
|
|
widget.myReferralPatientModel
|
|
|
|
|
.referringClinicDescription,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 4, top: 2.5, right: 2.5, bottom: 2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.referralDoctor,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
widget.myReferralPatientModel
|
|
|
|
|
.referringClinicDescription,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
'Referring Clinic',
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 5,),
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.referringClinicDescription}',
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
]),
|
|
|
|
|
TableRow(children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.referringClinic,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.referringClinicDescription}',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
'Frequency',
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 4, top: 2.5, right: 2.5, bottom: 2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).frequency,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
widget.myReferralPatientModel
|
|
|
|
|
.frequencyDescription,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
]),
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).priority,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.priorityDescription}',
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 5,),
|
|
|
|
|
AppText(
|
|
|
|
|
widget.myReferralPatientModel
|
|
|
|
|
.frequencyDescription,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
TableRow(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.all(2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
'Priority',
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 5,),
|
|
|
|
|
AppText(
|
|
|
|
|
'${widget.myReferralPatientModel.priorityDescription}',
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
left: 4,
|
|
|
|
|
top: 2.5,
|
|
|
|
|
right: 2.5,
|
|
|
|
|
bottom: 2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.maxResponseTime,
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
Helpers.getDateFormatted(widget
|
|
|
|
|
.myReferralPatientModel
|
|
|
|
|
.mAXResponseTime),
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 4,top: 2.5,right: 2.5,bottom: 2.5),
|
|
|
|
|
padding: EdgeInsets.all(5),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
'Max Response Time',
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 5,),
|
|
|
|
|
AppText(
|
|
|
|
|
Helpers.getDateFormatted(widget
|
|
|
|
|
.myReferralPatientModel
|
|
|
|
|
.mAXResponseTime),
|
|
|
|
|
fontSize:
|
|
|
|
|
1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.w300,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Divider(
|
|
|
|
|
color: Color(0xFF000000),
|
|
|
|
|
height: 0.5,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.clinicDetailsandRemarks,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Divider(color: Color(0xFF000000),height: 0.5,),
|
|
|
|
|
SizedBox(
|
|
|
|
|
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(
|
|
|
|
|
'${widget.myReferralPatientModel.referringDoctorRemarks}',
|
|
|
|
|
style: "bodyText1",
|
|
|
|
|
readMore: true,
|
|
|
|
|
Texts(
|
|
|
|
|
'${widget.myReferralPatientModel.referringDoctorRemarks}',
|
|
|
|
|
style: "bodyText1",
|
|
|
|
|
readMore: true,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
maxLength: 100)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
TranslationBase.of(context).answerSuggestions,
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
maxLength: 100)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppText(
|
|
|
|
|
'Answer/Suggestions',
|
|
|
|
|
fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
textAlign: TextAlign.start,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
Form(
|
|
|
|
|
key: _formKey,
|
|
|
|
|
child: TextFields(
|
|
|
|
|
maxLines: 2,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
hintText: 'Answer the patient',
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
initialValue: widget.myReferralPatientModel.referredDoctorRemarks ?? '',
|
|
|
|
|
readOnly: _isLoading,
|
|
|
|
|
validator: (value) {
|
|
|
|
|
if (value.isEmpty)
|
|
|
|
|
return "please enter answer";
|
|
|
|
|
else
|
|
|
|
|
return null;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10.0),
|
|
|
|
|
SizedBox(height: 10.0),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
margin: EdgeInsets.only(left: 10,right: 10),
|
|
|
|
|
child: Button(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
final form = _formKey.currentState;
|
|
|
|
|
if (form.validate()) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_isLoading = true;
|
|
|
|
|
});
|
|
|
|
|
try {
|
|
|
|
|
await Provider.of<MyReferralPatientProvider>(context, listen: false).replay(answerController.text.toString(), widget.myReferralPatientModel);
|
|
|
|
|
setState(() {
|
|
|
|
|
_isLoading = false;
|
|
|
|
|
});
|
|
|
|
|
DrAppToastMsg.showSuccesToast('Reply Successfully');
|
|
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_isLoading = false;
|
|
|
|
|
});
|
|
|
|
|
DrAppToastMsg.showErrorToast(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
title: 'Reply',
|
|
|
|
|
loading: _isLoading,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
Form(
|
|
|
|
|
key: _formKey,
|
|
|
|
|
child: TextFields(
|
|
|
|
|
maxLines: 2,
|
|
|
|
|
minLines: 2,
|
|
|
|
|
hintText:
|
|
|
|
|
TranslationBase.of(context).answerThePatient,
|
|
|
|
|
fontWeight: FontWeight.normal,
|
|
|
|
|
initialValue: widget.myReferralPatientModel
|
|
|
|
|
.referredDoctorRemarks ??
|
|
|
|
|
'',
|
|
|
|
|
readOnly: _isLoading,
|
|
|
|
|
validator: (value) {
|
|
|
|
|
if (value.isEmpty)
|
|
|
|
|
return TranslationBase.of(context)
|
|
|
|
|
.pleaseEnterAnswer;
|
|
|
|
|
else
|
|
|
|
|
return null;
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 10.0),
|
|
|
|
|
SizedBox(height: 10.0),
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10),
|
|
|
|
|
child: Button(
|
|
|
|
|
onTap: () async {
|
|
|
|
|
final form = _formKey.currentState;
|
|
|
|
|
if (form.validate()) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_isLoading = true;
|
|
|
|
|
});
|
|
|
|
|
try {
|
|
|
|
|
await Provider.of<MyReferralPatientProvider>(
|
|
|
|
|
context,
|
|
|
|
|
listen: false)
|
|
|
|
|
.replay(answerController.text.toString(),
|
|
|
|
|
widget.myReferralPatientModel);
|
|
|
|
|
setState(() {
|
|
|
|
|
_isLoading = false;
|
|
|
|
|
});
|
|
|
|
|
DrAppToastMsg.showSuccesToast(
|
|
|
|
|
'Reply Successfully');
|
|
|
|
|
} catch (e) {
|
|
|
|
|
setState(() {
|
|
|
|
|
_isLoading = false;
|
|
|
|
|
});
|
|
|
|
|
DrAppToastMsg.showErrorToast(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
title: TranslationBase.of(context).replay,
|
|
|
|
|
loading: _isLoading,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|