onSliderChange method
void
onSliderChange(
- dynamic value
Implementation
void onSliderChange(value){ //triggered if the user is dragging the user
isDraggingSlider.value = true;
currentPosition.value = value; //update the position of the slider
var currentSecond = (value * playerController.value.value.duration.inMilliseconds / 1000).floor();
displayCurrentDuration.value = formatSeconds(currentSecond); //only the display of the current duration will change, the video will still play as usual
}