|
|
@ -1,4 +1,5 @@
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/doctor/list_gt_my_patients_question_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
@ -8,6 +9,8 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|
|
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class DoctorReplyWidget extends StatefulWidget {
|
|
|
|
class DoctorReplyWidget extends StatefulWidget {
|
|
|
|
final ListGtMyPatientsQuestions reply;
|
|
|
|
final ListGtMyPatientsQuestions reply;
|
|
|
@ -22,6 +25,8 @@ class DoctorReplyWidget extends StatefulWidget {
|
|
|
|
class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
|
|
|
|
class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
child: CardWithBgWidget(
|
|
|
|
bgColor:
|
|
|
|
bgColor:
|
|
|
@ -57,6 +62,8 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
Column(
|
|
|
|
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
DateUtils.getDateTimeFromServerFormat(
|
|
|
|
DateUtils.getDateTimeFromServerFormat(
|
|
|
|
widget.reply.createdOn)
|
|
|
|
widget.reply.createdOn)
|
|
|
@ -76,7 +83,23 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
|
|
|
|
.toString(),
|
|
|
|
.toString(),
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
AppText(
|
|
|
|
|
|
|
|
DateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
|
|
|
widget.reply.createdOn)
|
|
|
|
|
|
|
|
.hour
|
|
|
|
|
|
|
|
.toString()
|
|
|
|
|
|
|
|
+ ":"+
|
|
|
|
|
|
|
|
DateUtils.getDateTimeFromServerFormat(
|
|
|
|
|
|
|
|
widget.reply.createdOn)
|
|
|
|
|
|
|
|
.minute
|
|
|
|
|
|
|
|
.toString(),
|
|
|
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
@ -197,6 +220,8 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
width: MediaQuery.of(context).size.width * 0.5,
|
|
|
|
width: MediaQuery.of(context).size.width * 0.5,
|
|
|
|
child: RichText(
|
|
|
|
child: RichText(
|
|
|
|
|
|
|
|
maxLines: 2,
|
|
|
|
|
|
|
|
overflow: TextOverflow.ellipsis,
|
|
|
|
text: new TextSpan(
|
|
|
|
text: new TextSpan(
|
|
|
|
style: new TextStyle(
|
|
|
|
style: new TextStyle(
|
|
|
|
fontSize: 2.0 * SizeConfig.textMultiplier,
|
|
|
|
fontSize: 2.0 * SizeConfig.textMultiplier,
|
|
|
@ -207,11 +232,11 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
|
|
|
|
style:
|
|
|
|
style:
|
|
|
|
TextStyle(fontSize: 14, fontFamily: 'Poppins', color: Color(0xFF575757),fontWeight: FontWeight.bold)),
|
|
|
|
TextStyle(fontSize: 14, fontFamily: 'Poppins', color: Color(0xFF575757),fontWeight: FontWeight.bold)),
|
|
|
|
new TextSpan(
|
|
|
|
new TextSpan(
|
|
|
|
text: widget.reply.remarks,
|
|
|
|
text: widget.reply.remarks.trim(),
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
color: Color(0xFF575757),
|
|
|
|
color: Color(0xFF575757),
|
|
|
|
fontSize: 15)),
|
|
|
|
fontSize: 12)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -219,234 +244,15 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
|
|
|
|
],)
|
|
|
|
],)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
SizedBox(
|
|
|
|
alignment: projectViewModel.isArabic?Alignment.centerLeft:Alignment.centerRight,
|
|
|
|
height: 20,
|
|
|
|
child: Icon(FontAwesomeIcons.arrowRight,
|
|
|
|
),
|
|
|
|
size: 20, color: Colors.black),)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
// onTap: onTap,
|
|
|
|
// onTap: onTap,
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
// Stack(
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.symmetric(vertical: 10.0),
|
|
|
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
|
|
|
// color: HexColor('#FFFFFF'),
|
|
|
|
|
|
|
|
// borderRadius: BorderRadius.all(
|
|
|
|
|
|
|
|
// Radius.circular(20.0),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.all(5),
|
|
|
|
|
|
|
|
// child: Column(
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// SizedBox(height: 18,),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(right: 15),
|
|
|
|
|
|
|
|
// child: Row(
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// SizedBox(width: 5,),
|
|
|
|
|
|
|
|
// //LargeAvatar(icon: widget.reply.gender == 0 ? DoctorApp.male : DoctorApp.femaleicon ,),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
|
|
|
// gradient: LinearGradient(
|
|
|
|
|
|
|
|
// begin: Alignment(-1, -1),
|
|
|
|
|
|
|
|
// end: Alignment(1, 1),
|
|
|
|
|
|
|
|
// colors: [
|
|
|
|
|
|
|
|
// Colors.grey[100],
|
|
|
|
|
|
|
|
// Colors.grey[200],
|
|
|
|
|
|
|
|
// ]),
|
|
|
|
|
|
|
|
// boxShadow: [
|
|
|
|
|
|
|
|
// BoxShadow(
|
|
|
|
|
|
|
|
// color: Color.fromRGBO(0, 0, 0, 0.08),
|
|
|
|
|
|
|
|
// offset: Offset(0.0, 5.0),
|
|
|
|
|
|
|
|
// blurRadius: 16.0)
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// borderRadius: BorderRadius.all(Radius.circular(50.0)),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// width: 80,
|
|
|
|
|
|
|
|
// height: 80,
|
|
|
|
|
|
|
|
// child: Icon(widget.reply.gender == 1 ? DoctorApp.male : DoctorApp.female_icon,size: 80,)),
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// SizedBox(width: 15,),
|
|
|
|
|
|
|
|
// Expanded(
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// child: Column(
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// AppText(
|
|
|
|
|
|
|
|
// widget.reply.patientName,
|
|
|
|
|
|
|
|
// fontSize: 1.5 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// SizedBox(
|
|
|
|
|
|
|
|
// height: 5,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// Row(
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// AppText(
|
|
|
|
|
|
|
|
// TranslationBase.of(context).fileNo,
|
|
|
|
|
|
|
|
// fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(left: 5),
|
|
|
|
|
|
|
|
// child: AppText(
|
|
|
|
|
|
|
|
// '${widget.reply.patientID}',
|
|
|
|
|
|
|
|
// fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// SizedBox(
|
|
|
|
|
|
|
|
// height: 5,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Row(
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// AppText(
|
|
|
|
|
|
|
|
// TranslationBase.of(context).mobileNo,
|
|
|
|
|
|
|
|
// fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// margin: EdgeInsets.only(left: 5),
|
|
|
|
|
|
|
|
// child: AppText(
|
|
|
|
|
|
|
|
// widget.reply.mobileNumber,
|
|
|
|
|
|
|
|
// fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// SizedBox(
|
|
|
|
|
|
|
|
// height: 5,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Row(
|
|
|
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// width: 70,
|
|
|
|
|
|
|
|
// height: 20,
|
|
|
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
|
|
|
// borderRadius: BorderRadius.all(Radius.circular(60.0)),
|
|
|
|
|
|
|
|
// color: Colors.green[600]
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// child: Center(
|
|
|
|
|
|
|
|
// child: AppText(
|
|
|
|
|
|
|
|
// widget.reply.requestTime,
|
|
|
|
|
|
|
|
// fontSize: 1.5 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// child: AppText(
|
|
|
|
|
|
|
|
// '${Helpers.getDate(widget.reply.requestDate)}',
|
|
|
|
|
|
|
|
// fontSize: 1.7 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// color: Colors.black,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// !widget.isShowMore ? SizedBox(height: 18,) :
|
|
|
|
|
|
|
|
// AnimatedContainer(
|
|
|
|
|
|
|
|
// duration: Duration(milliseconds: 200),
|
|
|
|
|
|
|
|
// child: Column(
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
|
|
|
// Divider(color: Colors.grey),
|
|
|
|
|
|
|
|
// SizedBox(height: 5,),
|
|
|
|
|
|
|
|
// Row(
|
|
|
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// AppText(
|
|
|
|
|
|
|
|
// TranslationBase.of(context).remarks + " : ",
|
|
|
|
|
|
|
|
// fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// //fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),Expanded(
|
|
|
|
|
|
|
|
// child: AppText(
|
|
|
|
|
|
|
|
// widget.reply.remarks,
|
|
|
|
|
|
|
|
// fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// //fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// SizedBox(height: 10,),
|
|
|
|
|
|
|
|
// Row(
|
|
|
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// AppText(
|
|
|
|
|
|
|
|
// TranslationBase.of(context).doctorResponse + " : ",
|
|
|
|
|
|
|
|
// fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// //fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),Expanded(
|
|
|
|
|
|
|
|
// child: AppText(
|
|
|
|
|
|
|
|
// widget.reply.doctorResponse,
|
|
|
|
|
|
|
|
// fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// //fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),SizedBox(height: 10,),
|
|
|
|
|
|
|
|
// Row(
|
|
|
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// AppText(
|
|
|
|
|
|
|
|
// TranslationBase.of(context).infoStatus + " : ",
|
|
|
|
|
|
|
|
// fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// //fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),Expanded(
|
|
|
|
|
|
|
|
// child: AppText(
|
|
|
|
|
|
|
|
// widget.reply.infoStatus,
|
|
|
|
|
|
|
|
// fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
|
|
|
|
// //fontWeight: FontWeight.bold,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Positioned(
|
|
|
|
|
|
|
|
// right: 5,
|
|
|
|
|
|
|
|
// top: 20,
|
|
|
|
|
|
|
|
// child: InkWell(
|
|
|
|
|
|
|
|
// onTap: (){
|
|
|
|
|
|
|
|
// setState(() {
|
|
|
|
|
|
|
|
// widget.isShowMore = !widget.isShowMore;
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// child: Icon(widget.isShowMore? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down)),
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|