Update slider position dynamically.

Actions & Logic

I’m building an audio player using native flutterflow widgets and just_audio only for actions (play, pause, stop, etc). 

I want a slider to act as a progress bar of the audio, as I can position it manually and trigger another action onChangeEnd.

When the play button is pressed, an action will get the position of the audio in time and writes into an app state (currentAudioPosition). Another action will write the total audio durantion on another app state (audioDuration)

Then currentAudioPosition is set to initial value on the slider and audioDuration is set to maximum.

A periodic action will execute and update the states every second but the slider does’t move as the audio plays, even if i rebuild component or containing page.

Is native slider the better option to achieve it or there’s another widget that I’m missing? Am I doing something wrong?

What have you tried so far?

Tried rebuild component and containing page when writing app states. Tried debuging by binding the state value into a text widget just to see if its updating and it is.

Did you check FlutterFlow's Documentation for this topic?
Yes
3