toggleVideoFit method
void
toggleVideoFit()
Toggle Change the videofit accordingly
Implementation
void toggleVideoFit() {
videoFitChangedTimer?.cancel();
videoFitChanged.value = true;
if (fits.indexOf(_videoFit.value) < fits.length - 1) {
_videoFit.value = fits[fits.indexOf(_videoFit.value) + 1];
} else {
_videoFit.value = fits[0];
}
print(_videoFit.value);
videoFitChangedTimer = Timer(Duration(seconds: 1), () {
print("hidden videoFit Changed");
videoFitChangedTimer = null;
videoFitChanged.value = false;
setUserPreferenceForFit();
});
}