croppy 0.0.3 croppy: ^0.0.3 copied to clipboard
A fully customizable image cropper for Flutter.
croppy #
An image cropper that Flutter deserves.
Big difference of this package from other popular ones (such as image_cropper
) is that croppy
runs completely in Flutter, so there's no need to launch a separate activity/view when you want to crop an image. Another benefit is that croppy
can be completely customized to fit any of your image cropping needs.
Features #
- iOS Photos app-like image cropper
- Supports any linear transformations on the image: scaling, rotating, skewing, flipping, etc
- Completely customizable (will create documentation with later releases)
In progress:
- Material image cropper (something similar to Google Photos)
- Image editing module (?) (brightness, contrast, etc)
- Fixed aspect ratios
- Custom cropping shapes
- Localization
- Kickass animations
Getting started #
Install croppy
from pub
:
dependencies:
croppy: <latest_version>
Enjoy using it :)
Usage #
Currently croppy
supports an iOS-like image cropper:
final result = await showCupertinoImageCropper(
context,
imageProvider: const NetworkImage('MY_IMAGE_URL'), // Or any other image provider
);
The return value of showCupertinoImageCropper
is CropImageResult
, which contains the image data encoded with the image
package. To convert it to dart:ui
's Image
, you can use await result.asUiImage
. Check out the image
package to convert the image to any of the supported formats (png, jpg, etc).
For a complete runnable example, see ./example
.
Additional information #
This package is still WIP, so expect some major updates along the way. Feel free to report bugs/issues on GitHub.
If you have questions, you can contact me directly at kk.erzhan@gmail.com
.
Credits:
- https://github.com/daniyarzt for the
FitAabbInQuadSolver
class