
TAVMagicCutFlutter to the project root directory, or place it in any other accessible directory based on your project structure requirements.pubspec.yaml file and specify the SDK directory, using the root directory as an example.tavmagic_cut_flutter:path: ./TAVMagicCutFlutter/Flutter
Resource asset package from the example into your application project directory.resource directory from Resource/Android to the src/main/assets folder of your Flutter project's main Android module (typically named app). If the assets directory does not exist, please create it manually.Resource directory located under Resource/IOS to the root directory of your Flutter project's iOS main module. Then, launch Xcode and open your Flutter iOS project.Runner), select Add Files to XXX, and choose the Resource folder before clicking Add.Reference files in place for the Action option and Create groups for the Groups option.FTAVMagicKitBase.instance.setLicense(TAV_MAGIC_LICENSE, TAV_MAGIC_KEY, listener: (errorCode, msg){if (errorCode == 0) {// success} else {// failed}});
_editProcessor = await tavMagicKit().openSelectEdit(selectOptions: FTAVKitSelectorOption());
tavMagicKit().openMediaSelected((resultList) {// get media}, options: FTAVKitSelectorOption());
FTAVKitSelectorOption()..displayColumnCount = 3 // display Column Count..mediaCategory = FTAVMediaCategory.ALL; // media category
_editProcessor = await tavMagicKit().openRecordEdit();
_editProcessor = await tavMagicKit().openDraftListForEdit();
_editProcessor = await tavMagicKit().openEdit(editOption: FTAVKitEditOptions());
_editProcessor?.exitEdit();
_editProcessor?.setEditEventListener((code, params) async {if (code == FTAVEditResultEventCode.PUBLISH) {String? editorKey = params[FTAVEditResultParamKey.EDITOR_KEY]?.toString();if (null != editorKey) {curGerTaskId = await tavMagicKit().generateVideoByEditKey(editorKey, listener: FTAVGenerateListener(onGenerateStarted: () {if (_progressController != null) {_progressController!.close();_progressController = null;}_progressController = DemoProgressController();_progressController!.show(context: context, onCancel: () {tavMagicKit().cancelGenerateByTaskId(curGerTaskId!);_progressController?.close();});},onGenerateProgress: (progress) {_progressController?.updateProgress(progress);},onGenerateCompleted: (int code, String msg, String outputPath) {_progressController?.close();if (code == FTAVGenerateResultCode.GENERATE_RESULT_SUCCEED) {////// release editor///tavMagicKit().releaseEditorByEditKey(editorKey);// jump to video pageNavigator.of(context).push(MaterialPageRoute(builder : (context) => VideoPage(outputPath),));} else {ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text('video generate error:$code, msg:$msg')));}}));}}});
tavMagicKit().releaseEditorByEditKey(editorKey);
curGerTaskId = await tavMagicKit().generateVideoByEditKey(editorKey, listener: FTAVGenerateListener(onGenerateStarted: (){},onGenerateProgress: (progress){},onGenerateCompleted: (int code, String msg, String outputPath) {}));
tavMagicKit().cancelGenerateByTaskId(curGerTaskId);
피드백