add doctor replay

merge-requests/503/head
Elham Rababah 4 years ago
parent 4ecf9fe4b9
commit f945861e1b

@ -23,9 +23,9 @@ class DoctorReplayChat extends StatelessWidget {
final ListGtMyPatientsQuestions reply; final ListGtMyPatientsQuestions reply;
TextEditingController msgController = TextEditingController(); TextEditingController msgController = TextEditingController();
final DoctorReplayViewModel previousModel;
DoctorReplayChat( DoctorReplayChat(
{Key key, this.reply, {Key key, this.reply, this.previousModel,
}); });
@override @override
@ -337,13 +337,14 @@ class DoctorReplayChat extends StatelessWidget {
children: <Widget>[ children: <Widget>[
FractionallySizedBox( FractionallySizedBox(
child: Container( child: Container(
child: TextFields( child: TextFields(
borderRadius: 0, borderRadius: 0,
hasLabelText: msgController.text != '' // hasLabelText: msgController.text != ''
? true // ? true
: false, // : false,
showLabelText: false, // showLabelText: false,
hintText: "\n"+TranslationBase hintText: TranslationBase
.of(context) .of(context)
.typeHereToReply, .typeHereToReply,
fontSize: 13.5, fontSize: 13.5,
@ -356,12 +357,9 @@ class DoctorReplayChat extends StatelessWidget {
helpers.showErrorToast("An error happened while you are replaying"); helpers.showErrorToast("An error happened while you are replaying");
} else { } else {
DrAppToastMsg.showSuccesToast("Thank you for your replay "); DrAppToastMsg.showSuccesToast("Thank you for your replay ");
await previousModel.getDoctorReply();
Navigator.pop(context);
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
DoctorReplyScreen()));
} }
@ -392,48 +390,6 @@ class DoctorReplayChat extends StatelessWidget {
), ),
), ),
// bottomSheet: Container(
// width: double.infinity,
// // height: MediaQuery.of(context).size.height * 0.12,
// child: Column(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// FractionallySizedBox(
// child: Container(
// child: TextFields(
// borderRadius: 0,
// hasLabelText: msgController.text != ''
// ? true
// : false,
// showLabelText: false,
// hintText: "\n"+TranslationBase
// .of(context)
// .typeHereToReply,
// fontSize: 13.5,
//
// suffixIcon: FontAwesomeIcons.arrowRight,
// suffixIconColor: Colors.green,
// onSuffixTap: (){
// model.replay(msgController.text, reply);
// },
// // hintColor: Colors.black,
// fontWeight: FontWeight.w600,
// maxLines: 50,
// minLines: 3,
// controller: msgController,
// validator: (value) {
// if (value == null || value == "")
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// }),
//
// ),
// ),
// ],
// ),
// )
)); ));
} }
} }

@ -44,7 +44,7 @@ class DoctorReplyScreen extends StatelessWidget {
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (BuildContext context) => builder: (BuildContext context) =>
DoctorReplayChat(reply: reply))); DoctorReplayChat(reply: reply, previousModel: model,)));
}, },
child: DoctorReplyWidget(reply: reply), child: DoctorReplyWidget(reply: reply),
); );

Loading…
Cancel
Save