VideoEditorController.file constructor

VideoEditorController.file(
  1. File file, {
  2. Duration? maxDuration,
  3. TrimSliderStyle? trimStyle,
  4. CoverSelectionStyle? coverStyle,
  5. CropGridStyle? cropStyle,
})

Constructs a VideoEditorController that edits a video from a file.

The file argument must not be null.

Implementation

VideoEditorController.file(
  this.file, {
  Duration? maxDuration,
  TrimSliderStyle? trimStyle,
  CoverSelectionStyle? coverStyle,
  CropGridStyle? cropStyle,
})  : _video = VideoPlayerController.file(file),
      _maxDuration = maxDuration ?? Duration.zero,
      cropStyle = cropStyle ?? CropGridStyle(),
      coverStyle = coverStyle ?? CoverSelectionStyle(),
      trimStyle = trimStyle ?? TrimSliderStyle();