process method

  1. @override
Future<FileWrapper> process(
  1. FilePickerConfig config,
  2. FileWrapper file
)
override

method that is to be implemented.

Implementation

@override
Future<FileWrapper> process(FilePickerConfig config, FileWrapper file) async {
  if (kIsWeb) {
    return file;
  } else if (file.isImage()) {
    return FileWrapper(file.type, await _compressImage(File(file.xFilePath), config));
  } else if (file.isVideo()) {
    return FileWrapper(
      file.type,
      await _compressVideo(File(file.xFilePath), config),
    );
  } else {
    return file;
  }
}