bufferPercent property
double
get
bufferPercent
Returns the current playback buffer position in percentage.
Implementation
double get bufferPercent {
if (buffer == Duration.zero || duration == Duration.zero) {
return 0.0;
} else {
final value = buffer.inMilliseconds / duration.inMilliseconds;
return value.clamp(0.0, 1.0);
}
}