isVideoFinished static method

bool isVideoFinished(
  1. VideoPlayerValue? value
)

Implementation

static bool isVideoFinished(VideoPlayerValue? value) {
  // on iOS 12.4.1, video duration is 0 -> https://github.com/flutter/flutter/issues/87334
  if (value == null || value.duration <= Duration(milliseconds: 1)) {
    return false;
  }

  return value.position >= value.duration;
}