compressImage static method
Future<String>
compressImage({
- required String imagePath,
- required ImageCompressionOptions options,
Compress image
Implementation
static Future<String> compressImage({
required String imagePath,
required ImageCompressionOptions options,
}) async {
final result = await _channel.invokeMethod('compressImage', {
'imagePath': imagePath,
'options': options.toMap(),
});
if (result is String) {
return result;
} else {
throw Exception('Invalid response from native code: $result');
}
}