|
|
|
@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/header_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/theme/colors.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
@ -26,14 +27,14 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
DoctorHeader(
|
|
|
|
|
{Key? key,
|
|
|
|
|
required this.headerModel,
|
|
|
|
|
this.buttonTitle,
|
|
|
|
|
this.onTap,
|
|
|
|
|
required this.headerModel,
|
|
|
|
|
this.buttonTitle,
|
|
|
|
|
this.onTap,
|
|
|
|
|
this.isNeedToShowButton = true,
|
|
|
|
|
this.isShowName = false,
|
|
|
|
|
this.buttonIcon,
|
|
|
|
|
this.showConfirmMessageDialog = true,
|
|
|
|
|
this.onRatingAndReviewTap})
|
|
|
|
|
this.onRatingAndReviewTap})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
late ProjectViewModel projectViewModel;
|
|
|
|
@ -127,26 +128,25 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
children: [
|
|
|
|
|
SizedBox(width: 21),
|
|
|
|
|
// RatingBar.readOnly(
|
|
|
|
|
// initialRating: headerModel.actualDoctorRate + 0.0,
|
|
|
|
|
// size: 15.0,
|
|
|
|
|
// filledColor: Color(0XFFD02127),
|
|
|
|
|
// emptyColor: Color(0XFFD02127),
|
|
|
|
|
// isHalfAllowed: true,
|
|
|
|
|
// halfFilledIcon: Icons.star_half,
|
|
|
|
|
// filledIcon: Icons.star,
|
|
|
|
|
// emptyIcon: Icons.star_border,
|
|
|
|
|
// ),
|
|
|
|
|
RatingBar(
|
|
|
|
|
initialRating: headerModel.actualDoctorRate! + 0.0,
|
|
|
|
|
//size: 15.0,
|
|
|
|
|
// filledColor: ,
|
|
|
|
|
// emptyColor: ,
|
|
|
|
|
// isHalfAllowed: true,
|
|
|
|
|
// halfFilledIcon: Icons.star_half,
|
|
|
|
|
// filledIcon: ,
|
|
|
|
|
ratingWidget: RatingWidget(full: Icon(Icons.star, color:Colors.yellow[700], size: 15,), half: Icon(Icons.star_half, color:Colors.grey[500], size: 15), empty: Icon(Icons.star_half, color:Colors.grey[500], size: 15)), onRatingUpdate: (double value) { },
|
|
|
|
|
),
|
|
|
|
|
itemSize: 20.0,
|
|
|
|
|
allowHalfRating: true,
|
|
|
|
|
initialRating: headerModel.actualDoctorRate! + 0.0,
|
|
|
|
|
ratingWidget: RatingWidget(
|
|
|
|
|
full: Icon(
|
|
|
|
|
Icons.star,
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
),
|
|
|
|
|
half: Icon(
|
|
|
|
|
Icons.star_half,
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
),
|
|
|
|
|
empty: Icon(
|
|
|
|
|
Icons.star_border,
|
|
|
|
|
color: CustomColors.accentColor,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onRatingUpdate: (double value) {}),
|
|
|
|
|
SizedBox(width: 6),
|
|
|
|
|
Text(
|
|
|
|
|
"${headerModel.totalReviews == null ? 0 : headerModel.totalReviews} ${TranslationBase.of(context).reviews}",
|
|
|
|
@ -180,7 +180,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
SvgPicture.asset(buttonIcon ?? 'assets/images/new/email.svg', width: 19.0),
|
|
|
|
|
SizedBox(width: 6),
|
|
|
|
|
Text(
|
|
|
|
|
buttonTitle! == null ? TranslationBase.of(context).sendEmail : buttonTitle!,
|
|
|
|
|
buttonTitle == null ? TranslationBase.of(context).sendEmail : buttonTitle!,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.64, height: 1),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
@ -281,26 +281,53 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
margin: EdgeInsets.symmetric(horizontal: 20.0),
|
|
|
|
|
child:
|
|
|
|
|
|
|
|
|
|
// RatingBar.readOnly(
|
|
|
|
|
// 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],
|
|
|
|
|
// isHalfAllowed: true,
|
|
|
|
|
// halfFilledIcon: Icons.star_half,
|
|
|
|
|
// filledIcon: Icons.star,
|
|
|
|
|
// emptyIcon: Icons.star,
|
|
|
|
|
// ),
|
|
|
|
|
// RatingBar.readOnly(
|
|
|
|
|
// 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],
|
|
|
|
|
// isHalfAllowed: true,
|
|
|
|
|
// halfFilledIcon: Icons.star_half,
|
|
|
|
|
// filledIcon: Icons.star,
|
|
|
|
|
// emptyIcon: Icons.star,
|
|
|
|
|
// ),
|
|
|
|
|
RatingBar(
|
|
|
|
|
initialRating: this.headerModel!.decimalDoctorRate! != null ? double.tryParse(this.headerModel!.decimalDoctorRate!)! : this.headerModel!.actualDoctorRate!.toDouble(),
|
|
|
|
|
//size: 15.0,
|
|
|
|
|
// filledColor: ,
|
|
|
|
|
// emptyColor: ,
|
|
|
|
|
// isHalfAllowed: true,
|
|
|
|
|
// halfFilledIcon: Icons.star_half,
|
|
|
|
|
// filledIcon: ,
|
|
|
|
|
ratingWidget: RatingWidget(full: Icon(Icons.star, color:Colors.yellow[700], size: 15,), half: Icon(Icons.star_half, color:Colors.grey[500], size: 15), empty: Icon(Icons.star_half, color:Colors.grey[500], size: 15)), onRatingUpdate: (double value) { },
|
|
|
|
|
),
|
|
|
|
|
itemSize: 20.0,
|
|
|
|
|
allowHalfRating: true,
|
|
|
|
|
initialRating: this.headerModel!.decimalDoctorRate! != null ? double.tryParse(this.headerModel!.decimalDoctorRate!)! : this.headerModel!.actualDoctorRate!.toDouble(),
|
|
|
|
|
ratingWidget: RatingWidget(
|
|
|
|
|
full: Icon(
|
|
|
|
|
Icons.star,
|
|
|
|
|
color: Color(0XFFD02127),
|
|
|
|
|
),
|
|
|
|
|
half: Icon(
|
|
|
|
|
Icons.star_half,
|
|
|
|
|
color: Color(0XFFD02127),
|
|
|
|
|
),
|
|
|
|
|
empty: Icon(
|
|
|
|
|
Icons.star_border,
|
|
|
|
|
color: Color(0XFFD02127),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
onRatingUpdate: (double value) {}),
|
|
|
|
|
// RatingBar(
|
|
|
|
|
// initialRating: this.headerModel!.decimalDoctorRate! != null ? double.tryParse(this.headerModel!.decimalDoctorRate!)! : this.headerModel!.actualDoctorRate!.toDouble(),
|
|
|
|
|
// //size: 15.0,
|
|
|
|
|
// // filledColor: ,
|
|
|
|
|
// // emptyColor: ,
|
|
|
|
|
// // isHalfAllowed: true,
|
|
|
|
|
// // halfFilledIcon: Icons.star_half,
|
|
|
|
|
// // filledIcon: ,
|
|
|
|
|
// ratingWidget: RatingWidget(
|
|
|
|
|
// full: Icon(
|
|
|
|
|
// Icons.star,
|
|
|
|
|
// color: Colors.yellow[700],
|
|
|
|
|
// size: 15,
|
|
|
|
|
// ),
|
|
|
|
|
// half: Icon(Icons.star_half, color: Colors.grey[500], size: 15),
|
|
|
|
|
// empty: Icon(Icons.star_half, color: Colors.grey[500], size: 15)),
|
|
|
|
|
// onRatingUpdate: (double value) {},
|
|
|
|
|
// ),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -325,8 +352,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[0].ratio).round().toString() + "%",
|
|
|
|
|
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
child: Text(getRatingWidth(doctorDetailsList[0].ratio).round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -346,8 +372,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
|
|
|
|
|
child: Text(doctorDetailsList[1].ratio.round().toString() + "%",
|
|
|
|
|
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
child: Text(doctorDetailsList[1].ratio.round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -367,8 +392,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
|
|
|
|
|
child: Text(doctorDetailsList[2].ratio.round().toString() + "%",
|
|
|
|
|
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
child: Text(doctorDetailsList[2].ratio.round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -388,8 +412,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
|
|
|
|
|
child: Text(doctorDetailsList[3].ratio.round().toString() + "%",
|
|
|
|
|
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
child: Text(doctorDetailsList[3].ratio.round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -410,8 +433,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
|
|
|
|
|
child: Text(doctorDetailsList[4].ratio.round().toString() + "%",
|
|
|
|
|
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
child: Text(doctorDetailsList[4].ratio.round().toString() + "%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
@ -442,7 +464,7 @@ class DoctorHeader extends StatelessWidget {
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: Stack(children: [
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 135.0,
|
|
|
|
|
width: 120.0,
|
|
|
|
|
height: 4.0,
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Colors.grey[300],
|
|
|
|
|