here is my code (READ THE COMMENTS)
Widget progressIndecator() {
return Countdown(
// here I have the number in seconds and he is counting down on runtime
seconds: 10,
build: (BuildContext context, double time) => SizedBox(
width: double.infinity,
height: 40.h,
child: LiquidLinearProgressIndicator(
// here is my indicator value also running on runtime
value: 0.5, // accepts only numbers between 0 and 1. the problem is, my timer in seconds and my indicator value between 0 and 1
valueColor: AlwaysStoppedAnimation(
Colors.red,
),
backgroundColor: Colors
.transparent,
borderColor: Colors.black12,
borderWidth: 1,
borderRadius: 20.r,
direction: Axis
.horizontal,
center: Text((time / 100).toString()),
),
),
interval: Duration(milliseconds: 100),
onFinished: () {
print('Timer is done!');
},
);
}
so how to make this works and convert the number in second to a number between 0 and 1 . please if you answer. provide a code
EDIT ** i have progress indecator he's only accepts numbers like 0.1 - 0.2 - 0.25 - 0.4 - 0.9 ... that mean the numbers between 0 and 1 only
I want to give this progessindecator a timer like 60 seconds or 30s... so on that timer, I want the progress to increase the value packages i use for the progressindecator liquid_progress_indicator: ^0.4.0
for the timer timer_count_down: ^2.2.1
and one last thing, I can't use setState