getFileThumbnail method
getFileThumbnail return Future<File>
quality can be controlled by quality
from 1 to 100,
select the position unit in the video by position
is milliseconds
Implementation
Future<File> getFileThumbnail(
String path, {
int quality = 100,
int position = -1,
}) async {
assert(quality > 1 || quality < 100);
// Not to set the result as strong-mode so that it would have exception to
// lead to the failure of compression
final filePath = await (_invoke<String>('getFileThumbnail', {
'path': path,
'quality': quality,
'position': position,
}));
final file = File(filePath!);
return file;
}