ve-sdk-flutter-integration-sample
ve-sdk-flutter-integration-sample copied to clipboard
Open photo editor from video editor
I encountered an issue with the exported path not being sent to Flutter, and the flutterResult not being correctly passed back to Flutter. To address this, I made the following modifications:
Added flutterResult Parameter: Included the flutterResult parameter in the presentPhotoEditor and related function calls to ensure the result is correctly passed back to Flutter.
Ensured Proper Result Handling: Updated methods like photoEditorDidFinishWithImage and videoEditorDidCancel to properly handle and send the result using flutterResult.
func presentPhotoEditor(with launchConfig: PhotoEditorLaunchConfig,
flutterResult: @escaping FlutterResult) {
self.flutterResult = flutterResult
photoEditorSDK?.presentPhotoEditor(
withLaunchConfiguration: launchConfig,
completion: nil
)
}
Pass the same parameters from other functions, i.e., checkLicenseAndOpenPhotoEditor.
This ensures that the flutterResult is properly passed and handled in all related function calls, facilitating correct communication between the native code and Flutter.