videoFile method

Future<String> videoFile(
  1. String id
)

Returns a temporary file path for the requested video.

Call this method to get a playable video file where id is from a LocalImage that has isVideo true. These files can be used for video playback using the video_player plugin for example. These files should either be moved or deleted by client code, or cleaned up occasionally using the cleanup method.

Implementation

Future<String> videoFile(String id) async {
  if (!_initWorked) {
    throw LocalImageProviderNotInitializedException();
  }
  _stopwatch.reset();
  _stopwatch.start();
  final String filePath =
      await LocalImageProviderPlatform.instance.videoFile(id);
  _stopwatch.stop();
  _totalLoadTime += _stopwatch.elapsedMilliseconds;
  _lastLoadTime = _stopwatch.elapsedMilliseconds;
  return filePath;
}