cropImage static method

Future<File> cropImage(
  1. String fileName,
  2. int originX,
  3. int originY,
  4. int width,
  5. int height,
)

Crops an image

Crops the given fileName. originX and originY control from where the image should be cropped. width and height control how the image is being cropped.

Implementation

static Future<File> cropImage(
    String fileName, int originX, int originY, int width, int height) async {
  var file = await _channel.invokeMethod("cropImage", {
    'file': fileName,
    'originX': originX,
    'originY': originY,
    'width': width,
    'height': height
  });

  return new File(file);
}