Skip to content

Commit 028c05a

Browse files
committed
adding comments to gf-loader
1 parent 70554a8 commit 028c05a

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

lib/components/loader/gf_loader.dart

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class GFLoader extends StatefulWidget {
3131
final Color loaderColorThree;
3232
final Duration duration;
3333
final GFLoaderType type;
34-
final Widget loaderIconOne;
34+
final Widget loaderIconOne ;
3535
final Widget loaderIconTwo;
3636
final Widget loaderIconThree;
3737
final Animation<Color> androidLoaderColor;
@@ -45,9 +45,9 @@ class GFLoader extends StatefulWidget {
4545

4646
class _GFLoaderState extends State<GFLoader>
4747
with SingleTickerProviderStateMixin {
48-
Animation<double> animation_1;
49-
Animation<double> animation_2;
50-
Animation<double> animation_3;
48+
Animation<double> loader_animation1;
49+
Animation<double> loader_animation2;
50+
Animation<double> loader_animation3;
5151
AnimationController controller;
5252

5353
@override
@@ -56,7 +56,7 @@ class _GFLoaderState extends State<GFLoader>
5656

5757
controller = AnimationController(duration: widget.duration, vsync: this);
5858

59-
animation_1 = Tween<double>(begin: 0, end: 1.0).animate(
59+
loader_animation1 = Tween<double>(begin: 0, end: 1.0).animate(
6060
CurvedAnimation(
6161
parent: controller,
6262
curve: const Interval(
@@ -68,7 +68,7 @@ class _GFLoaderState extends State<GFLoader>
6868
);
6969

7070

71-
animation_2 = Tween<double>(begin: 0, end: 1.0).animate(
71+
loader_animation2 = Tween<double>(begin: 0, end: 1.0).animate(
7272
CurvedAnimation(
7373
parent: controller,
7474
curve: const Interval(
@@ -79,7 +79,7 @@ class _GFLoaderState extends State<GFLoader>
7979
),
8080
);
8181

82-
animation_3 = Tween<double>(begin: 0, end: 1.0).animate(
82+
loader_animation3 = Tween<double>(begin: 0, end: 1.0).animate(
8383
CurvedAnimation(
8484
parent: controller,
8585
curve: const Interval(
@@ -92,7 +92,7 @@ class _GFLoaderState extends State<GFLoader>
9292

9393
controller.addListener(() {
9494
setState(() {
95-
//print(animation_1.value);
95+
//print(loader_animation1.value);
9696
});
9797
});
9898

@@ -125,12 +125,12 @@ class _GFLoaderState extends State<GFLoader>
125125
mainAxisAlignment: MainAxisAlignment.center,
126126
children: <Widget>[
127127
Opacity(
128-
opacity: animation_1.value <= 0.3
129-
? 2.5 * animation_1.value
130-
: (animation_1.value > 0.30 && animation_1.value <= 0.70)
128+
opacity: loader_animation1.value <= 0.3
129+
? 2.5 * loader_animation1.value
130+
: (loader_animation1.value > 0.30 && loader_animation1.value <= 0.70)
131131
? 1.0
132-
: 2.5 - (2.5 * animation_1.value),
133-
// opacity: (animation_1.value <= 0.4 ? 2.5 * animation_1.value : (animation_1.value > 0.40 && animation_1.value <= 0.60) ? 1.0 : 2.5 - (2.5 * animation_1.value)),
132+
: 2.5 - (2.5 * loader_animation1.value),
133+
// opacity: (loader_animation1.value <= 0.4 ? 2.5 * loader_animation1.value : (loader_animation1.value > 0.40 && loader_animation1.value <= 0.60) ? 1.0 : 2.5 - (2.5 * loader_animation1.value)),
134134
child: Padding(
135135
padding: const EdgeInsets.only(right: 8),
136136
child: Loader(
@@ -143,11 +143,11 @@ class _GFLoaderState extends State<GFLoader>
143143
),
144144
),
145145
Opacity(
146-
opacity: animation_2.value <= 0.3
147-
? 2.5 * animation_2.value
148-
: (animation_2.value > 0.30 && animation_2.value <= 0.70)
146+
opacity: loader_animation2.value <= 0.3
147+
? 2.5 * loader_animation2.value
148+
: (loader_animation2.value > 0.30 && loader_animation2.value <= 0.70)
149149
? 1.0
150-
: 2.5 - (2.5 * animation_2.value),
150+
: 2.5 - (2.5 * loader_animation2.value),
151151
child: Padding(
152152
padding: const EdgeInsets.only(right: 8),
153153
child: Loader(
@@ -160,11 +160,11 @@ class _GFLoaderState extends State<GFLoader>
160160
),
161161
),
162162
Opacity(
163-
opacity: animation_3.value <= 0.3
164-
? 2.5 * animation_3.value
165-
: (animation_3.value > 0.30 && animation_3.value <= 0.70)
163+
opacity: loader_animation3.value <= 0.3
164+
? 2.5 * loader_animation3.value
165+
: (loader_animation3.value > 0.30 && loader_animation3.value <= 0.70)
166166
? 1.0
167-
: 2.5 - (2.5 * animation_3.value),
167+
: 2.5 - (2.5 * loader_animation3.value),
168168
child: Padding(
169169
padding: const EdgeInsets.only(right: 8),
170170
child: Loader(

0 commit comments

Comments
 (0)