Language
Configure Blur
VideoEditor SDK supports configuring the focus 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.
items
#
items
#The set of available adjust tools can be configured by assigning an array to the FocusOptions.items
property.
By default, all focus modes are enabled, in our example, we only want to provide radial and linear blurs.
import 'package:catalog/models/code_example.dart';import 'package:imgly_sdk/imgly_sdk.dart';import 'package:video_editor_sdk/video_editor_sdk.dart';class VideoFocusConfigurationExample extends CodeExample {void invoke() async {// Create [FocusOptions] to configure the focus tool.final focusOptions = FocusOptions(// By default the editor shows all available adjust tools.// For this example, the editor should only show a small selection// of them.items: [FocusTool.none,FocusTool.radial,FocusTool.linear,]);// Create a [Configuration] instance.final configuration = Configuration(focus: focusOptions);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);}}}