New to flutter and async programming in general. I want to use this function:
https://pub.dev/documentation/ffmpeg_kit_flutter/latest/ffmpeg_kit/FFmpegKit/executeAsync.html
I don't understand the part that says
You must use an FFmpegSessionCompleteCallback if you want to be notified about the result.
Can someone explain how to use this as if I was a beginner programmer? Is this parameter something I can use to print a simple message to the console, like 'execution finished'?
What I've tried so far:
String test1() {
return 'FFMPEG FINISHED';
}
...later in the code
await FFmpegKit.executeAsync('ffmpeg -i ' + FileDir.path + currentFilename + ' ' + FileDir.path + currentOutputFilename + '.mp3', test1());
This gives an error pointing to the end of the await FFmpegKit... line: The argument type 'String' can't be assigned to the parameter type 'void Function(FFmpegSession)?'.