@@ -5,20 +5,20 @@ import 'package:getflutter/types/gf_loader_type.dart';
55
66class GFLoader extends StatefulWidget {
77
8- final Color dotOneColor ;
9- final Color dotTwoColor ;
10- final Color dotThreeColor ;
8+ final Color loaderColorOne ;
9+ final Color loaderColorTwo ;
10+ final Color loaderColorThree ;
1111 final Duration duration;
12- final LoaderDotType dotType ;
13- final Icon dotIcon ;
12+ final LoaderDotType loaderType ;
13+ final Icon loaderIcon ;
1414
1515 GFLoader ({
16- this .dotOneColor = Colors .redAccent,
17- this .dotTwoColor = Colors .green,
18- this .dotThreeColor = Colors .blueAccent,
16+ this .loaderColorOne = Colors .redAccent,
17+ this .loaderColorTwo = Colors .green,
18+ this .loaderColorThree = Colors .blueAccent,
1919 this .duration = const Duration (milliseconds: 1000 ),
20- this .dotType = LoaderDotType .circle,
21- this .dotIcon = const Icon (Icons .blur_on)
20+ this .loaderType = LoaderDotType .circle,
21+ this .loaderIcon = const Icon (Icons .blur_on)
2222 });
2323
2424 @override
@@ -71,44 +71,48 @@ class _GFLoaderState extends State<GFLoader>
7171
7272 @override
7373 Widget build (BuildContext context) {
74- // print(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));
74+ // print(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));
7575 return Container (
7676 child: new Row (
7777 mainAxisAlignment: MainAxisAlignment .center,
7878 children: < Widget > [
7979 Opacity (
80- 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)),
80+ opacity: (animation_1.value <= 0.4 ? 2.5 * animation_1.value :
81+ (animation_1.value > 0.40 && animation_1.value <= 0.60 ) ? 1.0 : 2.5 - (2.5 * animation_1.value)),
82+ // 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)),
8183 child: new Padding (
8284 padding: const EdgeInsets .only (right: 8.0 ),
8385 child: Dot (
8486 radius: 10.0 ,
85- color: widget.dotOneColor ,
86- type: widget.dotType ,
87- icon: widget.dotIcon ,
87+ color: widget.loaderColorOne ,
88+ type: widget.loaderType ,
89+ icon: widget.loaderIcon ,
8890 ),
8991 ),
9092 ),
9193 Opacity (
92- opacity: (animation_2.value <= 0.4 ? 2.5 * animation_2.value : (animation_2.value > 0.40 && animation_2.value <= 0.60 )? 1.0 : 2.5 - (2.5 * animation_2.value)),
94+ opacity: (animation_2.value <= 0.4 ? 2.5 * animation_2.value :
95+ (animation_2.value > 0.40 && animation_2.value <= 0.60 )? 1.0 : 2.5 - (2.5 * animation_2.value)),
9396 child: new Padding (
9497 padding: const EdgeInsets .only (right: 8.0 ),
9598 child: Dot (
9699 radius: 10.0 ,
97- color: widget.dotTwoColor ,
98- type: widget.dotType ,
99- icon: widget.dotIcon ,
100+ color: widget.loaderColorTwo ,
101+ type: widget.loaderType ,
102+ icon: widget.loaderIcon ,
100103 ),
101104 ),
102105 ),
103106 Opacity (
104- opacity: (animation_3.value <= 0.4 ? 2.5 * animation_3.value : (animation_3.value > 0.40 && animation_3.value <= 0.60 ) ? 1.0 : 2.5 - (2.5 * animation_3.value)),
107+ opacity: (animation_3.value <= 0.4 ? 2.5 * animation_3.value :
108+ (animation_3.value > 0.40 && animation_3.value <= 0.60 ) ? 1.0 : 2.5 - (2.5 * animation_3.value)),
105109 child: new Padding (
106110 padding: const EdgeInsets .only (right: 8.0 ),
107111 child: Dot (
108112 radius: 10.0 ,
109- color: widget.dotThreeColor ,
110- type: widget.dotType ,
111- icon: widget.dotIcon ,
113+ color: widget.loaderColorThree ,
114+ type: widget.loaderType ,
115+ icon: widget.loaderIcon ,
112116 ),
113117 ),
114118 ),
0 commit comments