convert method

Future<FileConverted> convert(
  1. File file
)

Converts a provided file into multiple images. The file is uploaded as FormData.

The supported file formats are:

  • doc/docx (Microsoft Word)
  • ppt/pptx
  • pdf

After the conversion, the files are broken into individual images with a maximum resolution of 2560x1600.

Implementation

Future<FileConverted> convert(File file) async {
  var result = await _methodChannel.invokeMethod<Map<Object?, Object?>>(
      "convert", file.toJson());
  return Future.value(
      result != null ? FileConvertedMapper.fromMap(result) : null);
}