croppedImage method
Future<Image>
croppedImage({
- FilterQuality quality = FilterQuality.high,
- CustomPainter? overlayPainter,
Returns the image cropped with the current crop rectangle.
You can provide the quality used in the resizing operation.
overlayPainter is an optional painter on top of the cropped image;
could be used for special effects on the cropped area.
Returns an Image asynchronously.
Implementation
Future<Image> croppedImage({
ui.FilterQuality quality = FilterQuality.high,
final CustomPainter? overlayPainter,
}) async {
return Image(
image: UiImageProvider(
await croppedBitmap(
quality: quality,
overlayPainter: overlayPainter,
),
),
fit: BoxFit.contain,
);
}