Here is a snippet that does not compile due to the Unable to find
ReturnCode`` error message.
What's missing?
import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart';
class Video {
/// Executes the command
void execute(String command) async {
FFmpegKit.execute(command).then((session) async {
final returnCode = await session.getReturnCode();
if (ReturnCode.isSuccess(returnCode)) {
// SUCCESS
} else if (ReturnCode.isCancel(returnCode)) {
// CANCEL
} else {
// ERROR
}
});
}
}
CodePudding user response:
ReturnCode class is defined in return_code
library. You should import it before use:
import 'package:ffmpeg_kit_flutter/return_code.dart';