process method
- FilePickerConfig config,
- 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;
}
}