Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 11.21.2
- **FEAT**(video-editor): Add `showControls` config to `VideoEditorConfigs` to allow hiding the video editor controls UI.

## 11.21.1
- **FEAT**(text-editor): Add `resizeToAvoidBottomInset` config to control whether the editor resizes when the keyboard appears.
- **FIX**(paint-editor): Resolve issue where erasing would randomly remove other layers.
Expand Down
11 changes: 11 additions & 0 deletions lib/core/models/editor_configs/video_editor_configs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class VideoEditorConfigs {
this.isAudioSupported = true,
this.enablePlayButton = false,
this.enableEstimatedFileSize = false,
this.showControls = true,
this.controlsPosition = VideoEditorControlPosition.top,
this.minTrimDuration = const Duration(seconds: 7),
this.maxTrimDuration,
Expand Down Expand Up @@ -76,6 +77,12 @@ class VideoEditorConfigs {
/// limits. That mean the displayed estimated file size could be wrong.
final bool enableEstimatedFileSize;

/// Whether to show the video editor controls UI.
///
/// When set to `false`, the controls widget (play/pause, mute, trim bar,
/// etc.) will be hidden.
final bool showControls;

/// Minimum scale factor for the trim bar.
final double trimBarMinScale;

Expand Down Expand Up @@ -117,6 +124,7 @@ class VideoEditorConfigs {
bool? isAudioSupported,
bool? enablePlayButton,
bool? enableEstimatedFileSize,
bool? showControls,
double? trimBarMinScale,
double? trimBarMaxScale,
Duration? playTimeSmoothingDuration,
Expand All @@ -139,6 +147,7 @@ class VideoEditorConfigs {
enablePlayButton: enablePlayButton ?? this.enablePlayButton,
enableEstimatedFileSize:
enableEstimatedFileSize ?? this.enableEstimatedFileSize,
showControls: showControls ?? this.showControls,
trimBarMinScale: trimBarMinScale ?? this.trimBarMinScale,
trimBarMaxScale: trimBarMaxScale ?? this.trimBarMaxScale,
playTimeSmoothingDuration:
Expand Down Expand Up @@ -169,6 +178,7 @@ class VideoEditorConfigs {
other.isAudioSupported == isAudioSupported &&
other.enablePlayButton == enablePlayButton &&
other.enableEstimatedFileSize == enableEstimatedFileSize &&
other.showControls == showControls &&
other.trimBarMinScale == trimBarMinScale &&
other.trimBarMaxScale == trimBarMaxScale &&
other.playTimeSmoothingDuration == playTimeSmoothingDuration &&
Expand All @@ -193,6 +203,7 @@ class VideoEditorConfigs {
isAudioSupported.hashCode ^
enablePlayButton.hashCode ^
enableEstimatedFileSize.hashCode ^
showControls.hashCode ^
trimBarMinScale.hashCode ^
trimBarMaxScale.hashCode ^
playTimeSmoothingDuration.hashCode ^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class MainEditorInteractiveContent extends StatelessWidget {
_buildCropAreaOverlay(),

/// Build video controls
if (isVideoEditor)
if (isVideoEditor && configs.videoEditor.showControls)
AnimatedOpacity(
opacity: hasSelectedLayers ? 0 : 1,
duration: configs.layerInteraction.videoControlsSwitchDuration,
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pro_image_editor
description: "A Flutter image editor: Seamlessly enhance your images with user-friendly editing features."
version: 11.21.1
version: 11.21.2
homepage: https://github.com/hm21/pro_image_editor/
repository: https://github.com/hm21/pro_image_editor/
documentation: https://github.com/hm21/pro_image_editor/
Expand Down