
TAVMagicCutFlutter to the project root directory, or place it in any other accessible directory based on your project structure requirements.tavmagic_cut_flutter:path: ./TAVMagicCutFlutter/Flutter
Resource from the example and drag it into your app project directory.example/android/app/src/main/assets to the src/main/assets directory of your Flutter project's main Android module (typically named app). If the assets directory does not exist, you may create it manually.Resource directory located under example/ios/Resource to the root directory of your Flutter project's iOS main module. Subsequently, launch Xcode and open your Flutter iOS project.Add Files to XXX, then choose the Resource folder and click 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);
피드백