Skip to main content

Show Editor

The VESDK class is the main entry point for opening the editor and lets you open the editor with the callable static function VESDK.openEditor as shown in this example.

Open the editor#

In order to load a Video into the editor simply specify it as the video parameter inside the asynchronous VESDK.openEditor function. In this example, we load a video from the bundle into the editor.

Handle events#

Once the editor finishes, a VideoEditorResult is returned which contains the edited video at If no result is returned, the user has canceled the editing process by clicking the cancel button inside the editor.

Next Steps#

import 'package:catalog/models/code_example.dart';
import 'package:video_editor_sdk/video_editor_sdk.dart';
class ShowVideoEditorExample extends CodeExample {
void invoke() async {
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);
if (result != null) {
// The user exported a new video successfully and the newly generated video is located at ``.
} else {
// The user tapped on the cancel button within the editor.
} catch (error) {
// There was an error generating the video.