VideoEditorController class

Inheritance
Available extensions

Constructors

VideoEditorController({bool initializeAi = true})

Properties

activeTrack → VideoTrackType?
no setter
aiAudioTracks → List<VideoEditorAudioTrack>
no setter
aiCaptions → List<VideoTextOverlay>
no setter
aiController → AIController
final
aiGeneratedClips → List<VideoEditorClip>
no setter
aiService → VideoAIService
no setter
aspectRatio → VideoAspectRatio
no setter
audioController → AudioController
final
audioTracks → List<VideoEditorAudioTrack>
no setter
canRedo → bool
no setter
canUndo → bool
no setter
clipAtPlayhead → VideoEditorClip?

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

The clip under the playhead.
no setter
clipController → ClipController
final
clips → List<VideoEditorClip>
no setter
currentClip → VideoEditorClip?
no setter
currentGlobalTime → Duration
no setter
currentPreviewFile → File?
no setter
currentTimeNotifier → ValueNotifier<Duration>
no setter
currentTimePosition → double

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

no setter
effect → VideoEditorEffect
no setter
effectController → EffectController
final
effectOverlays → List<VideoEffectOverlay>
no setter
effects → List<VideoEffectOverlay>
no setter
error → String?
no setter
exportController → ExportController
final
exportedVideoPath → String?
no setter
exportProgress → double
no setter
exportSettings ↔ ExportSettings
Settings used for the next export (also restored with a draft).
getter/setter pair
hasAudioTracks → bool
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
hasProject → bool
no setter
isDisposed → bool
no setter
isExporting → bool
no setter
isPlaying → bool
no setter
isProcessing → bool
no setter
isRenderingPreview → bool
no setter
previewIsComposed → bool
no setter
previewProgress → ValueListenable<double?>
no setter
projectId ↔ String?
Stable id of this project in ProjectStorage; assigned on first save.
getter/setter pair
projectState → ProjectState

Available on VideoEditorController, provided by the VideoEditorControllerHistory extension

Snapshot of the editable project (deep copy).
no setter
projectTitle ↔ String
User-facing project name.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedAIOverlayId → String?
no setter
selectedAudioId → String?
no setter
selectedAudioTrack → VideoEditorAudioTrack?

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

The audio track matching the current selection, if any.
no setter
selectedClip → VideoEditorClip?
no setter
selectedClipIndex → int
no setter
selectedEffectId → String?
no setter
selectedTextId → String?
no setter
selectedTextOverlay → VideoTextOverlay?

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

The text overlay matching the current selection, if any.
no setter
selectedTrackId → String?
no setter
selectedTrackType → VideoTrackType
no setter
textController → TextController
final
textOverlays → List<VideoTextOverlay>
no setter
timelineZoom → double
no setter
totalDuration → Duration

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

no setter
videoPlayerController → VideoPlayerController?
no setter
viewMode → TimelineViewMode
no setter
zoomLevel → double
no setter
zoomNotifier → ValueNotifier<double>
no setter

Methods

addAudioTrack(VideoEditorAudioTrack track) → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

Adds a single audio track (used by AI music/voiceover generation) and records the change in history.
addEffectOverlay(VideoEditorEffect effect) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

addEffectOverlayRange(VideoEditorEffect effect, Duration start, Duration end) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Adds a timed effect from start to end (project time).
addEmojiSticker(String emoji) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Adds an emoji sticker at the playhead.
addImageSticker(File image) → Future<void>

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Adds an image sticker (PNG/WebP with transparency works best) at the playhead. The file is copied into the app's documents so drafts keep working after the picker's cache is cleared.
addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addMediaFile(File file, {bool notify = true, bool record = true}) → Future<bool>

Available on VideoEditorController, provided by the VideoEditorControllerMedia extension

Appends file to the end of the timeline. Returns whether it was added.
addTextOverlay({required String text, double fontSize = 64, Color color = VideoEditorColors.onMedia, TextOverlayStyle style = TextOverlayStyle.outline, Color? backgroundColor, bool bold = true, String? stickerPath, String idPrefix = 'text'}) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

Adds a text overlay at the playhead, visible for three seconds (or until the end of the project).
addTimedTextOverlays(List<VideoTextOverlay> overlays) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

Adds many timed overlays (captions, generated titles) in one go and records a single history entry.
applyClipEdits(void edit(ClipController clips)) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Applies several clip edits as one undo step.
beginClipTransform(int index) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Starts a live crop/zoom/pan of clip index on the preview: selects it and shows the live clip preview so every change is visible at once.
cancelExport() → Future<void>

Available on VideoEditorController, provided by the VideoEditorControllerExportProject extension

clearError() → void

Available on VideoEditorController, provided by the VideoEditorControllerExportProject extension

Clears a reported error once the UI has shown it.
clearProject() → void

Available on VideoEditorController, provided by the VideoEditorControllerExportProject extension

clearTextOverlays() → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

clipIndexAt(Duration time) → int

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

Index of the clip playing at project time time, or -1 when empty.
clipStartTime(int index) → Duration

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

Project offset at which clip index starts.
cutOutClipRange(int index, Duration fileStart, Duration fileEnd) → bool

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Removes fileStart..fileEnd (file time) from clip index, keeping what lies before and after as two clips. One undo step. Returns false when nothing changed.
deselectAll() → void

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

Clears the timeline selection (tap on empty timeline / preview).
dispose() → void
Discards any resources used by the object.
override
duplicateClip(int index) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

Inserts a copy of clip index right after it.
endClipTransform({required bool changed}) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Ends a live transform: records it as one undo step when changed, otherwise just brings the composed preview back.
exportVideo({ExportSettings? settings}) → Future<String?>

Available on VideoEditorController, provided by the VideoEditorControllerExportProject extension

Renders the project with settings (defaults to exportSettings).
keepClipRanges(Map<String, List<TimeRange>> rangesByClipId, {bool dropUnlisted = false}) → Duration

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Rebuilds the timeline so each clip in rangesByClipId only keeps the listed file-time ranges (silence removal). Clips not listed, or listed with no ranges, stay as they are unless dropUnlisted (AI Shorts keeps only the picked moments). One undo step. Returns how much project time was removed.
loadProjectState(ProjectState state, {String? id, String? title}) → void

Available on VideoEditorController, provided by the VideoEditorControllerHistory extension

Replaces the whole project, e.g. when reopening a saved draft. The loaded state becomes the first undo entry.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
override
pausePlayback() → void

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

pickAudio() → Future<void>

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

pickMultipleMediaFromFiles() → Future<void>

Available on VideoEditorController, provided by the VideoEditorControllerMedia extension

pickMultipleMediaFromGallery() → Future<void>

Available on VideoEditorController, provided by the VideoEditorControllerMedia extension

pickOneImageFromGallery() → Future<void>

Available on VideoEditorController, provided by the VideoEditorControllerMedia extension

pickOneVideoFromGallery() → Future<void>

Available on VideoEditorController, provided by the VideoEditorControllerMedia extension

previewAudioTrim(String id, {Duration? fileStart, Duration? fileEnd}) → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

Live trim while a timeline handle is dragged; commit with saveState.
previewClipTrim({required int index, required Duration startTime, required Duration endTime}) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

Live trim while a timeline handle is dragged; commit with saveState.
previewEffectTiming(String id, Duration start, Duration end) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

Live timing change for an effect overlay; commit with saveState.
previewTextTiming(String id, Duration start, Duration end) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

Live timing change while a timeline handle is dragged; commit with saveState. Keeps at least 200ms visible.
recordVideoFromCamera() → Future<void>

Available on VideoEditorController, provided by the VideoEditorControllerMedia extension

redo() → void

Available on VideoEditorController, provided by the VideoEditorControllerHistory extension

reframeClip(int index, {required double subjectX, required double subjectY}) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

Frames clip index so the normalized subject point (subjectX, subjectY in 0..1 of the clip frame) sits at the canvas centre, filling the canvas. Used by AI auto-reframe.
removeAllAudioTracks() → int

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Removes every music / sound track. One undo step.
removeAudioTrack(dynamic idOrIndex) → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

removeClip(int index) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

removeEffectOverlay(String id) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

removeEffectOverlaysWhere(bool test(VideoEffectOverlay effect)) → int

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Removes every timed effect matching test. One undo step.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeTextOverlay(String id) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

removeTextOverlaysWhere(bool test(VideoTextOverlay overlay)) → int

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Removes every text overlay (text, captions or stickers) matching test. One undo step. Returns how many were removed.
reorderClips(int oldIndex, int newIndex) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

replaceAudioTrackFile(String id, File file, {Duration? duration}) → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

Swaps the media file of an existing track (used after AI enhancement).
replaceClipMedia(int index, File file) → Future<void>

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

Replaces the media of clip index with file (an AI render of the clip's trimmed range), keeping its place, speed, volume and look.
replaceClipSoundWithTracks(List<VideoEditorAudioTrack> tracks, {required List<int> muteClips}) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Puts tracks (a cleaned-up voice) on the timeline and mutes the clips at muteClips, as one undo step.
resetClipTransform(int index) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

saveAudioPosition() → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

saveClipCrop() → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

saveEffectPosition() → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

saveState() → void

Available on VideoEditorController, provided by the VideoEditorControllerHistory extension

saveTextOverlayPosition() → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

saveTextOverlayPositionInProject() → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

scaleAudioTrackVolumes(double factor) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Multiplies every audio track's volume by factor (kept within 0..2).
seekTo(Duration time) → void

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

Moves the playhead and shows that frame in the preview.
selectAudioTrack(String id) → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

selectClip(int index) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

selectEffectOverlay(String id) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

selectTextOverlay(String id) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

setAspectRatio(VideoAspectRatio ratio) → void

Available on VideoEditorController, provided by the VideoEditorControllerHistory extension

setAudioCleanupForAll(AudioCleanup cleanup) → int

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

The same clean-up on every clip with sound. Returns how many changed.
setAudioTrackVolume(String id, double volume) → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

Sets the volume (0..2) of the track with id.
setCanvasColor(Color color) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

Applies color as the canvas background of every clip.
setClipAudioCleanup(int index, AudioCleanup cleanup) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Noise reduction / voice clean-up for clip index. One undo step.
setClipTransition(int index, ClipTransition transition) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

setEffect(VideoEditorEffect effect) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

Applies effect as the look of the selected clip.
setFillModeForAll(VideoFillMode mode) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Fit or fill every clip (used with the ratio picker). One undo step.
setGlobalTime(Duration time) → void

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

Moves the playhead without touching the player (used while scrubbing).
setTimelineZoom(double zoom) → void

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

setTransitionForAll(ClipTransition transition) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Uses transition between every pair of clips.
setTransitionMix(List<ClipTransition> mix) → void

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

A different transition on every cut, cycling through mix. One undo step.
setViewMode(TimelineViewMode mode) → void

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

splitAtPlayhead() → bool

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

Splits whichever clip is under the playhead at the playhead.
splitAudioTrack(dynamic idOrIndex, Duration projectTime) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

splitClip(int index, Duration localTime, {bool record = true}) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

Splits clip index at localTime, measured in project time from the clip's start. The second half is inserted right after the first.
splitEffectOverlay(String id, Duration projectTime) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

splitTextOverlay(String id, Duration projectTime) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

startProjectWithRatio(VideoAspectRatio ratio, {required Future<void> pickMedia()}) → Future<void>

Available on VideoEditorController, provided by the VideoEditorControllerHistory extension

syncClipsToBeats({required double bpm, double strength = 1.0, Duration firstBeat = Duration.zero}) → int

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

Cuts the clips on the beat grid of bpm.
toggleAudioMute(int index) → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

toggleClipMute(int index) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

togglePlayback() → void

Available on VideoEditorController, provided by the VideoEditorControllerPlaybackSelection extension

toString() → String
A string representation of this object.
inherited
trimProjectTo(Duration target) → Duration

Available on VideoEditorController, provided by the VideoEditorControllerCreative extension

Shortens the project to target by trimming the end. One undo step. Returns how much was removed.
undo() → void

Available on VideoEditorController, provided by the VideoEditorControllerHistory extension

updateAudioPosition(String id, Duration newStartTime) → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

updateAudioTrim({required dynamic idOrIndex, required Duration startTime, required Duration endTime}) → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

updateAudioVolume(int index, double value) → void

Available on VideoEditorController, provided by the VideoEditorControllerAudio extension

updateClipBackgroundColor(int index, Color color) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

updateClipCrop(int index, {double? scale, double? x, double? y}) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

updateClipFillMode(int index, VideoFillMode mode) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

updateClipSpeed(int index, double value) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

updateClipTrim({required int index, required Duration startTime, required Duration endTime}) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

updateClipVolume(int index, double value) → void

Available on VideoEditorController, provided by the VideoEditorControllerClipEditing extension

updateEffectPosition(String id, Duration newStart) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

updateTextOverlay({required String id, String? text, double? fontSize, Color? color, TextOverlayStyle? style, Color? backgroundColor, bool? bold}) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

updateTextOverlayPosition({required String id, required double x, required double y, double? rotation, double? scale}) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

Live update while the user drags/pinches; commit with saveTextOverlayPosition.
updateTextOverlayPositionInProject(String id, Duration newStart) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

updateTextOverlayTiming({required String id, required Duration startTime, required Duration endTime}) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

updateTextPosition({required String id, required double x, required double y, double? rotation, double? scale}) → void

Available on VideoEditorController, provided by the VideoEditorControllerTextEffect extension

Operators

operator ==(Object other) → bool
The equality operator.
inherited