progress property

double get progress

Implementation

double get progress {
  final int total = duration.inMilliseconds;
  return total <= 0 ? 0 : (position.inMilliseconds / total).clamp(0, 1).toDouble();
}