compressWithFile method

Future<Uint8List?> compressWithFile({
  1. required String path,
  2. int targetWidth = 1920,
  3. int targetHeight = 1080,
  4. int quality = 95,
  5. int rotate = 0,
  6. bool autoCorrectionAngle = true,
  7. HostFormat targetFormat = HostFormat.jpeg,
  8. bool keepExif = false,
  9. int numberOfRetries = 5,
})

Implementation

Future<Uint8List?> compressWithFile({required String path, int targetWidth = 1920, int targetHeight = 1080, int quality = 95, int rotate = 0, bool autoCorrectionAngle = true, HostFormat targetFormat = HostFormat.jpeg, bool keepExif = false, int numberOfRetries = 5, }) async {
  final pigeonVar_channelName = 'dev.flutter.pigeon.image_compress_plus_ios.ImageCompressPlusHostApi.compressWithFile$pigeonVar_messageChannelSuffix';
  final pigeonVar_channel = BasicMessageChannel<Object?>(
    pigeonVar_channelName,
    pigeonChannelCodec,
    binaryMessenger: pigeonVar_binaryMessenger,
  );
  final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[path, targetWidth, targetHeight, quality, rotate, autoCorrectionAngle, targetFormat, keepExif, numberOfRetries]);
  final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;

  final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
      pigeonVar_replyList,
      pigeonVar_channelName,
      isNullValid: true,
  )
  ;
  return pigeonVar_replyValue as Uint8List?;
}