|
|
|
|
@ -20,6 +20,7 @@ import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
class DoctorReplayChat extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
@ -107,7 +108,7 @@ class DoctorReplayChat extends StatelessWidget {
|
|
|
|
|
SizedBox(height: 30,),
|
|
|
|
|
Container(
|
|
|
|
|
// color: Color(0xFF2B353E),
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.9,
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Color(0xFF2B353E),
|
|
|
|
|
@ -135,7 +136,7 @@ class DoctorReplayChat extends StatelessWidget {
|
|
|
|
|
width: 60,
|
|
|
|
|
height: 60,
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
1 == 1
|
|
|
|
|
reply.gender == 1
|
|
|
|
|
? 'assets/images/male_avatar.png'
|
|
|
|
|
: 'assets/images/female_avatar.png',
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
@ -144,7 +145,7 @@ class DoctorReplayChat extends StatelessWidget {
|
|
|
|
|
Divider(),
|
|
|
|
|
SizedBox(width: 10,),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.30,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.35,
|
|
|
|
|
child: AppText(
|
|
|
|
|
reply.patientName
|
|
|
|
|
.toString(),
|
|
|
|
|
@ -154,7 +155,19 @@ class DoctorReplayChat extends StatelessWidget {
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
// fontSize: 18
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 4),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
onTap: () {
|
|
|
|
|
launch("tel://" +reply.mobileNumber);
|
|
|
|
|
},
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.phone,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
@ -218,61 +231,61 @@ class DoctorReplayChat extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
Positioned(
|
|
|
|
|
bottom: 0,
|
|
|
|
|
child: Container(
|
|
|
|
|
width:MediaQuery.of(context).size.width * 1,
|
|
|
|
|
// height: MediaQuery.of(context).size.height * 0.12,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
|
|
child: TextFields(
|
|
|
|
|
borderRadius: 0,
|
|
|
|
|
hintText: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.typeHereToReply,
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
|
|
|
|
|
suffixIcon: FontAwesomeIcons.arrowRight,
|
|
|
|
|
suffixIconColor: Colors.green,
|
|
|
|
|
onSuffixTap: ()async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await model.replay(msgController.text, reply);
|
|
|
|
|
if(model.state == ViewState.ErrorLocal) {
|
|
|
|
|
Helpers.showErrorToast("An error happened while you are replaying");
|
|
|
|
|
} else {
|
|
|
|
|
DrAppToastMsg.showSuccesToast("Thank you for your replay ");
|
|
|
|
|
await previousModel.getDoctorReply();
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
}
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// 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;
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
// Positioned(
|
|
|
|
|
// bottom: 0,
|
|
|
|
|
// child: Container(
|
|
|
|
|
// width:MediaQuery.of(context).size.width * 1,
|
|
|
|
|
// // height: MediaQuery.of(context).size.height * 0.12,
|
|
|
|
|
// child: Column(
|
|
|
|
|
// mainAxisSize: MainAxisSize.min,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// FractionallySizedBox(
|
|
|
|
|
// child: Container(
|
|
|
|
|
//
|
|
|
|
|
// child: TextFields(
|
|
|
|
|
// borderRadius: 0,
|
|
|
|
|
// hintText: TranslationBase
|
|
|
|
|
// .of(context)
|
|
|
|
|
// .typeHereToReply,
|
|
|
|
|
// fontSize: 13.5,
|
|
|
|
|
//
|
|
|
|
|
// suffixIcon: FontAwesomeIcons.arrowRight,
|
|
|
|
|
// suffixIconColor: Colors.green,
|
|
|
|
|
// onSuffixTap: ()async {
|
|
|
|
|
// GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
// await model.replay(msgController.text, reply);
|
|
|
|
|
// if(model.state == ViewState.ErrorLocal) {
|
|
|
|
|
// Helpers.showErrorToast("An error happened while you are replaying");
|
|
|
|
|
// } else {
|
|
|
|
|
// DrAppToastMsg.showSuccesToast("Thank you for your replay ");
|
|
|
|
|
// await previousModel.getDoctorReply();
|
|
|
|
|
// Navigator.pop(context);
|
|
|
|
|
// }
|
|
|
|
|
// GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// },
|
|
|
|
|
// // 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;
|
|
|
|
|
// }),
|
|
|
|
|
//
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// )
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|