ProVideoController class

Controls video playback and trimming for the video editor.

Constructors

ProVideoController.new({required Widget videoPlayer, required Duration videoDuration, required Size initialResolution, required int fileSize, required List<ImageProvider<Object>> thumbnails})
Creates a ProVideoController instance.

Properties

callbacks VideoEditorCallbacks
Returns the configured video editor callbacks.
no setter
configs VideoEditorConfigs
Returns the video editor configuration settings.
no setter
endTime Duration
The end time of the trimmed video segment.
no setter
fileSize int
The size of the video file in bytes.
final
hashCode int
The hash code for this object.
no setterinherited
initialResolution Size
The initial resolution of the video.
final
isAudioEnabled bool
Indicates whether audio is currently enabled for the video.
no setter
isMutedNotifier ValueNotifier<bool>
Notifies listeners of the current mute state.
latefinal
isPlayingNotifier ValueNotifier<bool>
Notifies listeners of the current play state.
latefinal
playTimeNotifier ValueNotifier<Duration>
Notifies listeners of the current playback position.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startTime Duration
The start time of the trimmed video segment.
no setter
thumbnails List<ImageProvider<Object>>
Stores generated thumbnails for the trimmer bar and filter background.
final
trimDurationSpanNotifier ValueNotifier<TrimDurationSpan>
Notifies listeners of the selected trim duration span.
latefinal
videoDuration Duration
The total duration of the video.
final
videoPlayer Widget
The video player widget.
final

Methods

initialize({required VideoEditorCallbacks callbacksFunction(), required VideoEditorConfigs configsFunction()}) → void
Initializes the controller with provided callback and config functions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → void
Pauses video playback and triggers the pause callback.
play() → void
Starts video playback and triggers the play callback.
setMuteState(bool isMuted) → void
Sets the mute state and triggers the mute toggle callback.
setPlayTime(Duration duration) → void
Updates the current play position.
setTrimEnd(Duration duration) → void
Sets the end time for trimming and triggers the trim update callback.
setTrimSpan(TrimDurationSpan span) → void
Updates the trim span and triggers the trim update callback.
setTrimStart(Duration duration) → void
Sets the start time for trimming and triggers the trim update callback.
togglePlayState() → void
Toggles the play state of the video.
toString() String
A string representation of this object.
inherited

Operators

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