croppedBitmap method

Future<Image> croppedBitmap({
  1. double? maxSize,
  2. FilterQuality quality = FilterQuality.high,
  3. CustomPainter? overlayPainter,
})

Returns the bitmap cropped with the current crop rectangle.

maxSize is the maximum width or height you want. overlayPainter is an optional painter on top of the cropped image; could be used for special effects on the cropped area. You can provide the quality used in the resizing operation. Returns an ui.Image asynchronously.

Implementation

Future<ui.Image> croppedBitmap({
  final double? maxSize,
  final ui.FilterQuality quality = FilterQuality.high,
  final CustomPainter? overlayPainter,
}) async =>
    getCroppedBitmap(
      maxSize: maxSize,
      quality: quality,
      crop: crop,
      rotation: value.rotation,
      image: _bitmap!,
      overlayPainter: overlayPainter,
    );