kekland / croppy

A fully customizable image cropper for Flutter, in Flutter
MIT License
107 stars 32 forks source link
crop-image dart flutter image

Cover image

croppy

Pub Version

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:

NOTE: see https://github.com/kekland/croppy/issues/38. Currently I'm very busy with other projects so support might be limited.

Features

In progress:

Getting started

Install croppy from pub:

dependencies:
  croppy: <latest_version>

Enjoy using it :)

Usage

Currently croppy supports a Material (Google Photos-like) and a Cupertino (iOS Photos-like) image croppers:

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.

Localization

croppy currently supports the following languages:

If there's a language that you would like to add, please see the localization guide.

It's recommended to insert the CroppyLocalizations.delegate in your MaterialApp or CupertinoApp:

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 kk.erzhan@gmail.com.

Credits: