@@ -28,10 +28,10 @@ class GFRating extends StatefulWidget {
2828 final int itemCount;
2929
3030 /// defines the color of items
31- final Color color;
31+ final dynamic color;
3232
3333 /// defines the border color of [halfFilledIcon]
34- final Color borderColor;
34+ final dynamic borderColor;
3535
3636 /// defines the size of items. GFSize can be used for size variations like small. medium. large
3737 final dynamic size;
@@ -86,7 +86,7 @@ class _GFRatingState extends State<GFRating> {
8686 icon = widget.defaultIcon ??
8787 Icon (
8888 Icons .star_border,
89- color: widget.borderColor ?? Theme .of (context).primaryColor,
89+ color: GFColors . getGFColor ( widget.borderColor) ?? Theme .of (context).primaryColor,
9090 size: GFSizesClass .getGFSize (widget.size),
9191 );
9292 } else if (! widget.showTextForm
@@ -96,14 +96,14 @@ class _GFRatingState extends State<GFRating> {
9696 icon = widget.halfFilledIcon ??
9797 Icon (
9898 Icons .star_half,
99- color: widget.color ?? Theme .of (context).primaryColor,
99+ color: GFColors . getGFColor ( widget.color) ?? Theme .of (context).primaryColor,
100100 size: GFSizesClass .getGFSize (widget.size),
101101 );
102102 } else {
103103 icon = widget.filledIcon ??
104104 Icon (
105105 Icons .star,
106- color: widget.color ?? Theme .of (context).primaryColor,
106+ color: GFColors . getGFColor ( widget.color) ?? Theme .of (context).primaryColor,
107107 size: GFSizesClass .getGFSize (widget.size),
108108 );
109109 }
0 commit comments