|
|
|
@ -17,6 +17,7 @@ import 'package:diplomaticquarterapp/widgets/others/entity_checkbox_list.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
|
|
|
|
|
import 'base/base_view.dart';
|
|
|
|
|
import 'final_products_page.dart';
|
|
|
|
@ -641,11 +642,21 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
StarRating(
|
|
|
|
|
totalAverage: model.subProducts[index].approvedRatingSum > 0
|
|
|
|
|
? (model.subProducts[index].approvedRatingSum.toDouble() / model.subProducts[index].approvedRatingSum.toDouble()).toDouble()
|
|
|
|
|
: 0,
|
|
|
|
|
forceStars: true),
|
|
|
|
|
// StarRating(
|
|
|
|
|
// totalAverage: model.subProducts[index].approvedRatingSum > 0
|
|
|
|
|
// ? (model.subProducts[index].approvedRatingSum.toDouble() / model.subProducts[index].approvedRatingSum.toDouble()).toDouble()
|
|
|
|
|
// : 0,
|
|
|
|
|
// forceStars: true),
|
|
|
|
|
RatingBar.readOnly(
|
|
|
|
|
initialRating: model.subProducts[index].approvedRatingSum.toDouble(),
|
|
|
|
|
size: 15.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
"(${model.subProducts[index].approvedTotalReviews})",
|
|
|
|
|
regular: true,
|
|
|
|
@ -766,11 +777,21 @@ class _SubCategorisePageState extends State<SubCategorisePage> {
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
StarRating(
|
|
|
|
|
totalAverage: model.subProducts[index].approvedRatingSum > 0
|
|
|
|
|
? (model.subProducts[index].approvedRatingSum.toDouble() / model.subProducts[index].approvedRatingSum.toDouble()).toDouble()
|
|
|
|
|
: 0,
|
|
|
|
|
forceStars: true),
|
|
|
|
|
// StarRating(
|
|
|
|
|
// totalAverage: model.subProducts[index].approvedRatingSum > 0
|
|
|
|
|
// ? (model.subProducts[index].approvedRatingSum.toDouble() / model.subProducts[index].approvedRatingSum.toDouble()).toDouble()
|
|
|
|
|
// : 0,
|
|
|
|
|
// forceStars: true),
|
|
|
|
|
RatingBar.readOnly(
|
|
|
|
|
initialRating: model.subProducts[index].approvedRatingSum.toDouble(),
|
|
|
|
|
size: 15.0,
|
|
|
|
|
filledColor: Colors.yellow[700],
|
|
|
|
|
emptyColor: Colors.grey[500],
|
|
|
|
|
isHalfAllowed: true,
|
|
|
|
|
halfFilledIcon: Icons.star_half,
|
|
|
|
|
filledIcon: Icons.star,
|
|
|
|
|
emptyIcon: Icons.star,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
"(${model.subProducts[index].approvedTotalReviews})",
|
|
|
|
|
regular: true,
|
|
|
|
|