|
|
|
@ -223,7 +223,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
|
width: 350.0,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
@ -249,11 +249,14 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
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: Text(this.headerModel.decimalDoctorRate != null ? this.headerModel.decimalDoctorRate : this.headerModel.actualDoctorRate.ceilToDouble().toString(),
|
|
|
|
|
style: TextStyle(fontSize: 32.0, color: Colors.black, letterSpacing: -0.64, fontWeight: FontWeight.bold))),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 20.0),
|
|
|
|
|
child: RatingBar.readOnly(
|
|
|
|
|
initialRating: this.headerModel.actualDoctorRate.toDouble(),
|
|
|
|
|
initialRating: this.headerModel.decimalDoctorRate != null ? double.tryParse(this.headerModel.decimalDoctorRate) : this.headerModel.actualDoctorRate.toDouble(),
|
|
|
|
|
size: 35.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
@ -267,7 +270,9 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
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))),
|
|
|
|
|
transform: Matrix4.translationValues(0.0, -10.0, 0.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(
|
|
|
|
@ -278,22 +283,14 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
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],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
|
|
|
|
|
getRatingLine(doctorDetailsList[0].patientNumber, 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)),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[0].patientNumber).round().toString() + "%",
|
|
|
|
|
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -307,22 +304,14 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
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),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
|
|
|
|
|
getRatingLine(doctorDetailsList[1].patientNumber, 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)),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[1].patientNumber).round().toString() + "%",
|
|
|
|
|
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -336,22 +325,14 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
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),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
|
|
|
|
|
getRatingLine(doctorDetailsList[2].patientNumber, 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)),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[2].patientNumber).round().toString() + "%",
|
|
|
|
|
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -365,22 +346,14 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
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),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
|
|
|
|
|
getRatingLine(doctorDetailsList[3].patientNumber, 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)),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[3].patientNumber).round().toString() + "%",
|
|
|
|
|
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -395,53 +368,18 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
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),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
|
|
|
|
|
getRatingLine(doctorDetailsList[4].patientNumber, Color(0xffE20C0C)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
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)),
|
|
|
|
|
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)),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -462,4 +400,26 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
var width = (patientNumber / this.headerModel.totalReviews) * 100;
|
|
|
|
|
return width.roundToDouble();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget getRatingLine(int patientNumber, Color color) {
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: Stack(children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 135.0,
|
|
|
|
|
height: 4.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Colors.grey[300],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: getRatingWidth(patientNumber) * 1.35,
|
|
|
|
|
height: 4.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: color,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|