Skip to content

Commit 280de1f

Browse files
committed
gfshimmer updated with duration
1 parent 7b88a8d commit 280de1f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/components/shimmer/gf_shimmer.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ class GFShimmer extends StatefulWidget {
1010
@required this.child,
1111
@required this.gradient,
1212
this.direction = GFShimmerDirection.ltr,
13-
this.period = const Duration(milliseconds: 1500),
13+
this.duration = const Duration(milliseconds: 1500),
1414
this.loop = 0,
1515
this.enabled = true,
1616
}) : super(key: key);
1717

1818
final Widget child;
19-
final Duration period;
19+
final Duration duration;
2020
final GFShimmerDirection direction;
2121
final Gradient gradient;
2222
final int loop;
@@ -27,7 +27,7 @@ class GFShimmer extends StatefulWidget {
2727
@required this.child,
2828
@required Color baseColor,
2929
@required Color highlightColor,
30-
this.period = const Duration(milliseconds: 1500),
30+
this.duration = const Duration(milliseconds: 1500),
3131
this.direction = GFShimmerDirection.ltr,
3232
this.loop = 0,
3333
this.enabled = true,
@@ -62,7 +62,7 @@ class _GFShimmerState extends State<GFShimmer> with SingleTickerProviderStateMix
6262
void initState() {
6363
super.initState();
6464
_count = 0;
65-
_controller = AnimationController(vsync: this, duration: widget.period)
65+
_controller = AnimationController(vsync: this, duration: widget.duration)
6666
..addStatusListener((AnimationStatus status) {
6767
if (status != AnimationStatus.completed) {
6868
return;
@@ -102,7 +102,6 @@ class _GFShimmerState extends State<GFShimmer> with SingleTickerProviderStateMix
102102
),
103103
);
104104

105-
106105
@override
107106
void dispose() {
108107
_controller.dispose();

0 commit comments

Comments
 (0)