VideoEditorController.file constructor
VideoEditorController.file(
- File file, {
- Duration maxDuration = Duration.zero,
- Duration minDuration = Duration.zero,
- CoverSelectionStyle coverStyle = const CoverSelectionStyle(),
- CropGridStyle cropStyle = const CropGridStyle(),
- TrimSliderStyle? trimStyle,
Constructs a VideoEditorController that edits a video from a file.
The file
argument must not be null.
Implementation
VideoEditorController.file(
this.file, {
this.maxDuration = Duration.zero,
this.minDuration = Duration.zero,
this.coverStyle = const CoverSelectionStyle(),
this.cropStyle = const CropGridStyle(),
TrimSliderStyle? trimStyle,
}) : _video = VideoPlayerController.file(File(
// https://github.com/flutter/flutter/issues/40429#issuecomment-549746165
Platform.isIOS ? Uri.encodeFull(file.path) : file.path,
)),
trimStyle = trimStyle ?? TrimSliderStyle(),
assert(maxDuration > minDuration,
'The maximum duration must be bigger than the minimum duration');