Skip to content

Commit a747a30

Browse files
committed
gfRating changed color to dynamic
1 parent 910b24a commit a747a30

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

lib/components/rating/gf_rating.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

lib/components/shimmer/gf_shimmer.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter/rendering.dart';
33

4-
enum GFShimmerDirection { leftToRight, rightToLeft, topToBottom, bottomToTop }
4+
enum GFShimmerDirection {leftToRight, rightToLeft, topToBottom, bottomToTop}
55

66
@immutable
77
class GFShimmer extends StatefulWidget {
@@ -54,9 +54,9 @@ class GFShimmer extends StatefulWidget {
5454
],
5555
stops: const <double>[
5656
0,
57-
0.35,
57+
0.3,
5858
0.5,
59-
0.65,
59+
0.7,
6060
1
6161
]),
6262
super(key: key);

0 commit comments

Comments
 (0)