exportImageBySeconds method Null safety

Future<File> exportImageBySeconds(
  1. File file,
  2. Duration duration,
  3. double radian
)

Returns the file list of the exporting image

  • parameters:
    • file: file of video
    • duration: export the duration of frames
    • radian: rotation the frame ,which will export frame.Rotation is clockwise.

Implementation

static Future<File> exportImageBySeconds(
    File file, Duration duration, double radian) async {
  var milli = duration.inMilliseconds;
  var para = {"filePath": file.path, "duration": milli, "radian": radian};
  final String path =
      await _channel.invokeMethod('exportImageBySeconds', para);
  try {
    var result = File.fromUri(Uri.file(path));
    return result;
  } catch (e) {
    throw e;
  }
}