https://github.com/kekland/croppy
A fully customizable image cropper for Flutter, in Flutter
https://github.com/kekland/croppy
crop-image dart flutter image
Last synced: 2 months ago
JSON representation
A fully customizable image cropper for Flutter, in Flutter
- Host: GitHub
- URL: https://github.com/kekland/croppy
- Owner: kekland
- License: mit
- Created: 2023-05-16T10:36:12.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-03-12T08:55:46.000Z (3 months ago)
- Last Synced: 2025-03-29T04:03:05.234Z (3 months ago)
- Topics: crop-image, dart, flutter, image
- Language: Dart
- Homepage:
- Size: 67.9 MB
- Stars: 123
- Watchers: 3
- Forks: 43
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README

# croppy
[](https://pub.dev/packages/croppy)
A fully customizable image cropper for Flutter, with built-in Material and Cupertino croppers.
Check out the example at https://kekland.github.io/croppy.
![]()
![]()
![]()
![]()
Supported platforms:
- Android
- iOS
- Windows
- Linux (untested, but should work)
- macOS
- Web (uses Dart's Cassowary instead of FFI because there's no FFI support in web)NOTE: see https://github.com/kekland/croppy/issues/38. Currently I'm very busy with other projects so support might be limited.
## Features
- Material image cropper (similar to Google Photos)
- iOS Photos app-like image cropper
- Support for any linear transformations on the image: scaling, rotating, skewing, flipping, etc
- Completely customizable (will create documentation with later releases)
- Fixed aspect ratios
- Custom cropping shapes
- Kickass animations
- LocalizationIn progress:
- Image editing module (?) (brightness, contrast, etc)
## Getting started
Install `croppy` from `pub`:
```yaml
dependencies:
croppy:
```Enjoy using it :)
## Usage
Currently `croppy` supports a Material (Google Photos-like) and a Cupertino (iOS Photos-like) image croppers:
```dart
final result = await showMaterialImageCropper(
context,
imageProvider: const NetworkImage('MY_IMAGE_URL'), // Or any other image provider
);final result = await showCupertinoImageCropper(
context,
imageProvider: const NetworkImage('MY_IMAGE_URL'), // Or any other image provider
);
```Voilà! You can now start cropping images.
For a complete runnable example, see `./example`. For the full in-depth documentation, including customization, see the [documentation](./doc/doc.md).
## Localization
`croppy` currently supports the following languages:
- English
- Kazakh
- Russian
- Arabic (thanks @Milad-Akarie)
- Vietnamese (thanks @ptanhVNU)
- Portuguese (thanks @JCKodel)
- Spanish (thanks @Thesergiolg99)
- Chinese (thanks @yohom and @zhushenwudi)
- Hebrew (thanks @kfiross)
- German (thanks @jkoenig134)
- Persian (thanks @mdpe-ir)If there's a language that you would like to add, please see the [localization](./doc/localization.md) guide.
It's recommended to insert the `CroppyLocalizations.delegate` in your `MaterialApp` or `CupertinoApp`:
```dart
MaterialApp(
localizationsDelegates: [
CroppyLocalizations.delegate, // <- This here
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
...
)
```## Additional information
Feel free to report bugs/issues on GitHub.
If you have questions, you can contact me directly at `[email protected]`.
Credits:
- https://github.com/daniyarzt for the `FitAabbInQuadSolver` class