@@ -84,16 +84,14 @@ class _GFRatingState extends State<GFRating> {
8484
8585 Widget buildRatingBar (BuildContext context, int index) {
8686
87- print ('jkkl ${GFSizesClass .getGFSize (widget .size )}' );
88-
8987 Widget icon;
9088 if (index >= widget.value) {
9189 icon = widget.defaultIcon != null
9290 ? widget.defaultIcon
9391 : Icon (
9492 Icons .star_border,
9593 color: widget.borderColor ?? Theme .of (context).primaryColor,
96- size: GFSizesClass .getGFSize (widget.size). toDouble () ,
94+ size: GFSizesClass .getGFSize (widget.size),
9795 );
9896 } else if (! widget.textForm
9997 ? index > widget.value - (widget.allowHalfRating ? 0.5 : 1.0 ) &&
@@ -104,15 +102,15 @@ class _GFRatingState extends State<GFRating> {
104102 : Icon (
105103 Icons .star_half,
106104 color: widget.color ?? Theme .of (context).primaryColor,
107- size: GFSizesClass .getGFSize (widget.size). toDouble () ,
105+ size: GFSizesClass .getGFSize (widget.size),
108106 );
109107 } else {
110108 icon = widget.filledIcon != null
111109 ? widget.filledIcon
112110 : Icon (
113111 Icons .star,
114112 color: widget.color ?? Theme .of (context).primaryColor,
115- size: GFSizesClass .getGFSize (widget.size). toDouble () ,
113+ size: GFSizesClass .getGFSize (widget.size),
116114 );
117115 }
118116
@@ -125,7 +123,7 @@ class _GFRatingState extends State<GFRating> {
125123 onHorizontalDragUpdate: (dragDetails) {
126124 final RenderBox box = context.findRenderObject ();
127125 final _pos = box.globalToLocal (dragDetails.globalPosition);
128- final i = _pos.dx / widget.size;
126+ final i = _pos.dx / GFSizesClass . getGFSize ( widget.size) ;
129127 var newRating = widget.allowHalfRating ? i : i.round ().toDouble ();
130128 if (newRating > widget.itemCount) {
131129 newRating = widget.itemCount.toDouble ();
0 commit comments