Skip to content

Commit 0636124

Browse files
committed
progress indicator
1 parent 1342fe1 commit 0636124

1 file changed

Lines changed: 20 additions & 9 deletions

File tree

lib/components/progress_indicator/gf_progress_indicator.dart

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,6 @@ class _GFProgressBarState extends State<GFProgressBar>
182182
double _progressPercent = 0.0;
183183
double _percent = 0.0;
184184

185-
@override
186-
void dispose() {
187-
if (_animationController != null) {
188-
_animationController.dispose();
189-
}
190-
super.dispose();
191-
}
192-
193185
@override
194186
void initState() {
195187
if (widget.animation) {
@@ -210,6 +202,16 @@ class _GFProgressBarState extends State<GFProgressBar>
210202
super.initState();
211203
}
212204

205+
206+
@override
207+
void dispose() {
208+
if (_animationController != null) {
209+
_animationController.dispose();
210+
}
211+
super.dispose();
212+
}
213+
214+
213215
@override
214216
void didUpdateWidget(GFProgressBar oldWidget) {
215217
super.didUpdateWidget(oldWidget);
@@ -266,7 +268,14 @@ class _GFProgressBarState extends State<GFProgressBar>
266268
? widget.center
267269
: Container(),
268270
),
269-
): CircularPercentIndicator(radius: 20.0);
271+
): CircularPercentIndicator(radius: 100.0,
272+
lineWidth: widget.lineWidth!=null? widget.lineWidth:10,
273+
percent: widget.progressPercent!=null? widget.progressPercent: 0.6,
274+
center: widget.center,
275+
circularStrokeCap: widget.circularStrokeCap,
276+
backgroundColor: widget.backgroundColor,
277+
maskFilter:widget.maskFilter,
278+
linearGradient: widget.linearGradient);
270279

271280
if (hasSetWidth) {
272281
items.add(containerWidget);
@@ -500,6 +509,8 @@ class CircularPercentIndicator extends StatefulWidget {
500509
_CircularPercentIndicatorState();
501510
}
502511

512+
513+
503514
class _CircularPercentIndicatorState extends State<CircularPercentIndicator>
504515
with SingleTickerProviderStateMixin, AutomaticKeepAliveClientMixin {
505516
AnimationController _animationController;

0 commit comments

Comments
 (0)