currentProgress method

double? currentProgress()

Implementation

double? currentProgress() {
  if (dotLottiePlayer != null && !isDisposed) {
    try {
      final current = currentFrame();
      final total = totalFrames();
      if (current != null && total != null && total > 0) {
        return current / total;
      }
      return null;
    } catch (e) {
      return null;
    }
  }
  return null;
}