|
|
|
|
@ -220,166 +220,228 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
child: Dialog(
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
// height: 400.0,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
color: Theme.of(context).primaryColor,
|
|
|
|
|
margin: EdgeInsets.only(bottom: 5.0),
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))),
|
|
|
|
|
Container(margin: EdgeInsets.only(top: 0.0), child: Text(this.headerModel.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 5.0),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
child: RatingBar.readOnly(
|
|
|
|
|
initialRating: this.headerModel.actualDoctorRate.toDouble(),
|
|
|
|
|
size: 35.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
),
|
|
|
|
|
padding: EdgeInsets.all(20.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.black, fontWeight: FontWeight.w600, letterSpacing: -0.64)),
|
|
|
|
|
IconButton(
|
|
|
|
|
icon: Icon(
|
|
|
|
|
Icons.close,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
)),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(margin: EdgeInsets.only(left: 20.0), child: Text(this.headerModel.decimalDoctorRate != null ? this.headerModel.decimalDoctorRate : this.headerModel.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black, fontWeight: FontWeight.bold))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 20.0),
|
|
|
|
|
child: RatingBar.readOnly(
|
|
|
|
|
initialRating: this.headerModel.actualDoctorRate.toDouble(),
|
|
|
|
|
size: 35.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: Text(this.headerModel.totalReviews.toString() + " " + TranslationBase.of(context).reviews, style: TextStyle(fontSize: 14.0, color: Colors.black))),
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 20.0),
|
|
|
|
|
child: Text(this.headerModel.totalReviews.toString() + " " + TranslationBase.of(context).reviews, style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100.0,
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: getRatingWidth(doctorDetailsList[0].patientNumber),
|
|
|
|
|
height: 6.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Colors.green[700],
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100.0,
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: getRatingWidth(doctorDetailsList[0].patientNumber),
|
|
|
|
|
height: 6.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Colors.green[700],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[0].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100.0,
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: getRatingWidth(doctorDetailsList[1].patientNumber),
|
|
|
|
|
height: 6.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color(0xffB7B723),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100.0,
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: getRatingWidth(doctorDetailsList[1].patientNumber),
|
|
|
|
|
height: 6.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color(0xffB7B723),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[1].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100.0,
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: getRatingWidth(doctorDetailsList[2].patientNumber),
|
|
|
|
|
height: 6.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color(0xffEBA727),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100.0,
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: getRatingWidth(doctorDetailsList[2].patientNumber),
|
|
|
|
|
height: 6.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color(0xffEBA727),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[2].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100.0,
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: getRatingWidth(doctorDetailsList[3].patientNumber),
|
|
|
|
|
height: 6.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color(0xffEB7227),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100.0,
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: getRatingWidth(doctorDetailsList[3].patientNumber),
|
|
|
|
|
height: 6.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color(0xffEB7227),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[3].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 30.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100.0,
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: getRatingWidth(doctorDetailsList[4].patientNumber),
|
|
|
|
|
height: 6.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color(0xffE20C0C),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 100.0,
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
|
|
|
|
|
child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: SizedBox(
|
|
|
|
|
width: getRatingWidth(doctorDetailsList[4].patientNumber),
|
|
|
|
|
height: 6.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Color(0xffE20C0C),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(margin: EdgeInsets.only(top: 40.0), child: Divider()),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 0.0),
|
|
|
|
|
child: Align(
|
|
|
|
|
alignment: FractionalOffset.bottomCenter,
|
|
|
|
|
child: ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width,
|
|
|
|
|
height: 40.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
elevation: 0.0,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
textColor: Colors.red,
|
|
|
|
|
hoverColor: Colors.transparent,
|
|
|
|
|
focusColor: Colors.transparent,
|
|
|
|
|
highlightColor: Colors.transparent,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[4].patientNumber).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// Container(margin: EdgeInsets.only(top: 40.0), child: Divider()),
|
|
|
|
|
// Container(
|
|
|
|
|
// margin: EdgeInsets.only(top: 0.0),
|
|
|
|
|
// child: Align(
|
|
|
|
|
// alignment: FractionalOffset.bottomCenter,
|
|
|
|
|
// child: ButtonTheme(
|
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
|
// borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
// ),
|
|
|
|
|
// minWidth: MediaQuery.of(context).size.width,
|
|
|
|
|
// height: 40.0,
|
|
|
|
|
// child: RaisedButton(
|
|
|
|
|
// elevation: 0.0,
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
// textColor: Colors.red,
|
|
|
|
|
// hoverColor: Colors.transparent,
|
|
|
|
|
// focusColor: Colors.transparent,
|
|
|
|
|
// highlightColor: Colors.transparent,
|
|
|
|
|
// disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
|
// },
|
|
|
|
|
// child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -398,6 +460,6 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
double getRatingWidth(int patientNumber) {
|
|
|
|
|
var width = (patientNumber / this.headerModel.totalReviews) * 100;
|
|
|
|
|
return width;
|
|
|
|
|
return width.roundToDouble();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|