getStarMap method

Widget getStarMap()

Implementation

Widget getStarMap(){

  return Container(
    height: 250,
    margin: EdgeInsets.fromLTRB(0, 20, 0, 0),
    width: double.infinity,
    color: Colors.white,
    child: Row(
      children: [
        Expanded(
          child: Row(
            children: [
              Spacer(),
              getHorizontalBar(percentage: startOneValue ?? 30,index: 1),
              Spacer(),
              getHorizontalBar(percentage: starTwoValue ?? 40,index: 2),
              Spacer(),
              getHorizontalBar(percentage: starThreeValue ?? 60,index: 3),
              Spacer(),
              getHorizontalBar(percentage: starFourValue ?? 75,index: 4),
              Spacer(),
              getHorizontalBar(percentage: starFiveValue ?? 35,index: 5),
              Spacer(),
            ],
          ),
        ),
        Container(
          margin: EdgeInsets.fromLTRB(10, 0, 10, 0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              Text(
                headerText ?? "Ratings",
                style: TextStyle(
                    fontFamily: fontName ?? "",
                    fontSize: 18,
                    color: headerTextColor ?? Color(0xFF707070),
                    fontWeight: FontWeight.w500),
              ),
              Text(
                starRating ?? "5.0",
                style: TextStyle(
                    fontFamily: fontName ?? "",
                    fontSize: 70,
                    color: starRatingTextColor ?? Color(0xFF120E21),
                    fontWeight: FontWeight.w800),
              )
            ],
          ),
        )

      ],
    ),
  );
}