|
|
|
|
@ -13,6 +13,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
@ -111,7 +112,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Text(
|
|
|
|
|
TranslationBase.of(context).likeToHear,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 21),
|
|
|
|
|
@ -159,99 +160,23 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
isShowListAppointHistory = true;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
// margin: EdgeInsets.all(8.0),
|
|
|
|
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
width: projectViewModel.isArabic ? 27 : 20,
|
|
|
|
|
height: projectViewModel.isArabic ? 105 : 90,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
//Colors.red[900] Color(0xff404545)
|
|
|
|
|
color: appointHistory.isLiveCareAppointment
|
|
|
|
|
? Color(0xff404545)
|
|
|
|
|
: !appointHistory.isInOutPatient
|
|
|
|
|
? Colors.red[900]
|
|
|
|
|
: Theme.of(context).primaryColor,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
|
|
|
|
|
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
|
|
|
|
|
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
|
|
|
|
|
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: RotatedBox(
|
|
|
|
|
quarterTurns: 3,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Text(
|
|
|
|
|
appointHistory.isLiveCareAppointment
|
|
|
|
|
? TranslationBase.of(context).liveCare.toUpperCase()
|
|
|
|
|
: !appointHistory.isInOutPatient
|
|
|
|
|
? TranslationBase.of(context).inPatient.toUpperCase()
|
|
|
|
|
: TranslationBase.of(context).outpatient.toUpperCase(),
|
|
|
|
|
style: TextStyle(color: Colors.white, fontSize: 12),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(10.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: LargeAvatar(
|
|
|
|
|
name: appointHistory.doctorNameObj,
|
|
|
|
|
url: appointHistory.doctorImageURL,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Texts(
|
|
|
|
|
appointHistory.doctorNameObj,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)),
|
|
|
|
|
variant: 'caption3',
|
|
|
|
|
),
|
|
|
|
|
StarRating(totalAverage: appointHistory.doctorRate.toDouble(), forceStars: true),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
|
size: 15,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
child: DoctorCard(
|
|
|
|
|
onTap: () {},
|
|
|
|
|
isInOutPatient: appointHistory.isInOutPatient,
|
|
|
|
|
name: appointHistory.doctorTitle + " " + appointHistory.doctorNameObj,
|
|
|
|
|
// billNo: _appointmentResult.invoiceNo,
|
|
|
|
|
profileUrl: appointHistory.doctorImageURL,
|
|
|
|
|
subName: appointHistory.projectName,
|
|
|
|
|
isLiveCareAppointment: appointHistory.isLiveCareAppointment,
|
|
|
|
|
date: DateUtil.convertStringToDate(appointHistory.appointmentDate),
|
|
|
|
|
rating: appointHistory.actualDoctorRate + 0.0,
|
|
|
|
|
appointmentTime: appointHistory.startTime.substring(0, 5),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 12),
|
|
|
|
|
if (messageType == MessageType.ComplaintOnAnAppointment && model.appointHistoryList.length != 0 && isShowListAppointHistory)
|
|
|
|
|
Container(
|
|
|
|
|
height: model.appointHistoryList.length > 2 ? MediaQuery.of(context).size.height * 0.25 : MediaQuery.of(context).size.height * 0.15,
|
|
|
|
|
height: model.appointHistoryList.length > 2 ? MediaQuery.of(context).size.height * 0.35 : MediaQuery.of(context).size.height * 0.17,
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
itemCount: model.appointHistoryList.length,
|
|
|
|
|
itemBuilder: (context, index) => InkWell(
|
|
|
|
|
@ -261,76 +186,87 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
isShowListAppointHistory = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 8, right: 8),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Padding(
|
|
|
|
|
padding: const EdgeInsets.all(10.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: LargeAvatar(
|
|
|
|
|
name: model.appointHistoryList[index].doctorNameObj,
|
|
|
|
|
url: model.appointHistoryList[index].doctorImageURL,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 4,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Texts(
|
|
|
|
|
model.appointHistoryList[index].doctorNameObj,
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
|
|
|
|
|
variant: 'caption3',
|
|
|
|
|
),
|
|
|
|
|
StarRating(totalAverage: model.appointHistoryList[index].doctorRate.toDouble(), forceStars: true),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 1,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.arrow_forward_ios,
|
|
|
|
|
size: 15,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
Divider(
|
|
|
|
|
height: 0.5,
|
|
|
|
|
color: Colors.grey[400],
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
child: DoctorCard(
|
|
|
|
|
onTap: () {},
|
|
|
|
|
isInOutPatient: model.appointHistoryList[index].isInOutPatient,
|
|
|
|
|
name: model.appointHistoryList[index].doctorTitle + " " + model.appointHistoryList[index].doctorNameObj,
|
|
|
|
|
profileUrl: model.appointHistoryList[index].doctorImageURL,
|
|
|
|
|
subName: model.appointHistoryList[index].projectName,
|
|
|
|
|
isLiveCareAppointment: model.appointHistoryList[index].isLiveCareAppointment,
|
|
|
|
|
date: DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate),
|
|
|
|
|
rating: model.appointHistoryList[index].actualDoctorRate + 0.0,
|
|
|
|
|
appointmentTime: model.appointHistoryList[index].startTime.substring(0, 5),
|
|
|
|
|
),
|
|
|
|
|
// Container(
|
|
|
|
|
// margin: EdgeInsets.only(left: 8, right: 8),
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// child: Column(
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Row(
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 4,
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Padding(
|
|
|
|
|
// padding: const EdgeInsets.all(10.0),
|
|
|
|
|
// child: Row(
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 1,
|
|
|
|
|
// child: LargeAvatar(
|
|
|
|
|
// name: model.appointHistoryList[index].doctorNameObj,
|
|
|
|
|
// url: model.appointHistoryList[index].doctorImageURL,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 4,
|
|
|
|
|
// child: Container(
|
|
|
|
|
// margin: EdgeInsets.all(10),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// Texts(
|
|
|
|
|
// model.appointHistoryList[index].doctorNameObj,
|
|
|
|
|
// bold: true,
|
|
|
|
|
// ),
|
|
|
|
|
// Texts(
|
|
|
|
|
// DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
|
|
|
|
|
// variant: 'caption3',
|
|
|
|
|
// ),
|
|
|
|
|
// StarRating(totalAverage: model.appointHistoryList[index].doctorRate.toDouble(), forceStars: true),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// flex: 1,
|
|
|
|
|
// child: Center(
|
|
|
|
|
// child: Icon(
|
|
|
|
|
// Icons.arrow_forward_ios,
|
|
|
|
|
// size: 15,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(
|
|
|
|
|
// height: 5,
|
|
|
|
|
// ),
|
|
|
|
|
// Divider(
|
|
|
|
|
// height: 0.5,
|
|
|
|
|
// color: Colors.grey[400],
|
|
|
|
|
// )
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -515,19 +451,6 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
),
|
|
|
|
|
suffixIconConstraints: BoxConstraints(minWidth: 50),
|
|
|
|
|
suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap),
|
|
|
|
|
// prefixIconConstraints: BoxConstraints(minWidth: 50),
|
|
|
|
|
// prefixIcon: suffix == null
|
|
|
|
|
// ? null
|
|
|
|
|
// : Text(
|
|
|
|
|
// "+" + suffix,
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 14,
|
|
|
|
|
// height: 21 / 14,
|
|
|
|
|
// fontWeight: FontWeight.w500,
|
|
|
|
|
// color: Color(0xff2E303A),
|
|
|
|
|
// letterSpacing: -0.56,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
contentPadding: EdgeInsets.zero,
|
|
|
|
|
border: InputBorder.none,
|
|
|
|
|
focusedBorder: InputBorder.none,
|
|
|
|
|
@ -581,8 +504,11 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
setState(() {
|
|
|
|
|
appointHistory = null;
|
|
|
|
|
isShowListAppointHistory = true;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
isShowListAppointHistory = false;
|
|
|
|
|
}
|
|
|
|
|
setMessageType(value);
|
|
|
|
|
},
|
|
|
|
|
|