cropImage method

Future<void> cropImage(
  1. Data data,
  2. int x,
  3. int y,
  4. int width,
  5. int height,
)

Implementation

Future<void> cropImage(Data data, int x, int y, int width, int height) async
{
  for (var row in data)
  {
    var bytes = await _toBytes(row);
    if (bytes != null)
    {
      String? uri = await isolate.crop(bytes,x,y,width,height);
      if (uri != null) _saveData(row, uri);
    }
  }
}