loadVideo method
Loads a video using the path provided.
Returns the loaded video file.
Implementation
Future<void> loadVideo(
{required File videoFile, VideoPlayerOptions? videoPlayerOptions}) async {
currentVideoFile = videoFile;
if (videoFile.existsSync()) {
_videoPlayerController = VideoPlayerController.file(
currentVideoFile!,
videoPlayerOptions: videoPlayerOptions,
);
await _videoPlayerController!.initialize().then((_) {
_controller.add(TrimmerEvent.initialized);
});
}
}