Skip to main content
Language

Configure Adjustments

VideoEditor SDK supports several configuration options for the adjustments tool, allowing flexible adaptation to different needs and use cases. For a detailed explanation of how to configure different editor views, refer to this guide.

showResetButton#

By default, users can reset all the applied adjust operations. In our example, we hide the reset button.

items#

The set of available adjust tools can be configured by assigning an array to the items property. In our example, we only want to provide adjustments for brightness, contrast and saturation.

import 'package:catalog/models/code_example.dart';
import 'package:imgly_sdk/imgly_sdk.dart';
import 'package:video_editor_sdk/video_editor_sdk.dart';
class VideoAdjustmentsConfigurationExample extends CodeExample {
void invoke() async {
// Create [AdjustmentOptions] to configure the adjustments tool.
final adjustmentOptions = AdjustmentOptions(
// By default the editor always shows the reset button.
// For this example, the reset button should not be shown.
showResetButton: false,
// By default the editor shows all available adjust tools.
// For this example, the editor should only show a small selection
// of them.
items: [
AdjustmentTool.brightness,
AdjustmentTool.contrast,
AdjustmentTool.saturation,
]
);
// Create a [Configuration] instance.
final configuration = Configuration(adjustment: adjustmentOptions);
try {
// Add a video from the assets directory.
final video = Video("assets/Skater.mp4");
// Open the video editor and handle the export as well as any occurring errors.
final result =
await VESDK.openEditor(video, configuration: configuration);
if (result != null) {
// The user exported a new video successfully and the newly generated video is located at `result.video`.
print(result.video);
} else {
// The user tapped on the cancel button within the editor.
return;
}
} catch (error) {
// There was an error generating the video.
print(error);
}
}
}