Giter Site home page Giter Site logo

kfiross / croppy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kekland/croppy

0.0 0.0 0.0 62.99 MB

A fully customizable image cropper for Flutter, in Flutter

License: MIT License

Shell 0.13% Ruby 1.18% C++ 25.39% C 1.31% Objective-C 0.15% Java 0.13% Kotlin 0.03% Dart 65.80% Swift 0.43% HTML 0.42% CMake 5.04%

croppy's Introduction

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:

  • 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)

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
  • Localization

In progress:

  • Image editing module (?) (brightness, contrast, etc)

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:

  • English
  • Kazakh
  • Russian
  • Arabic (thanks @Milad-Akarie)
  • Vietnamese (thanks @ptanhVNU)
  • Portuguese (thanks @JCKodel)

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

It's recommended to insert the CroppyLocalizationDelegate in your MaterialApp or CupertinoApp:

MaterialApp(
  localizationsDelegates: [
    CroppyLocalizationDelegate(), // <- 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:

croppy's People

Contributors

kekland avatar jckodel avatar thesergiolg99 avatar defuncart avatar milad-akarie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.