Flutter simple image crop - A simple and easy to use flutter plugin to crop image on iOS and Android

Overview

Image Zoom and Cropping plugin for Flutter

A simple and easy used flutter plugin to crop image on iOS and Android.

Image Cropping circle area Image Cropping rect area Image Cropping rect gif Image Cropping area gif

Installation

Add simple_image_crop simple_image_crop as a dependency in pubspec.yaml.

Using

Create a widget to load and edit an image:

image can be of any type:

  ImgCrop(...),  //  ImageProvider
  ImgCrop.file(...) // Image file
  ImgCrop.asset(...) // Image assets your local
final imgCropKey = GlobalKey<ImgCropState>();

Widget _buildCropImage() {
  return Container(
      color: Colors.black,
      child: ImgCrop(
        key: cropKey,
        chipRadius: 150,  // crop area radius
        chipShape: ChipShape.rect,
        chipRatio: 2 / 1,
        image: FileImage(imageFile), // you selected image file
      ),
  );
}

Generate a cropped image:

a async function get cropped file image:

  • croppedImage is you cropped image File
  • pictureQuality Can control image size and quality
  final croppedFile = await crop.cropCompleted(
    croppedImage,
    {pictureQuality: 900}
  )
floatingActionButton: FloatingActionButton(
  onPressed: () async {
    final crop = cropKey.currentState;
    final croppedFile =
        await crop.cropCompleted(args['image'], pictureQuality: 900);

    // show you croppedFile ……
    showImage(context, croppedFile);
  },

it's so esay !

You might also like...

WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App: Label StoreMax Label StoreMax - v5.3.1 Official WooSignal WooCommerce App About Label StoreMax Label StoreMax is an App Template for

Jan 9, 2023

Flutter plugin to display a popup menu button widget with handsome design and easy to use.

Flutter plugin to display a popup menu button widget with handsome design and easy to use.

menu_button Flutter widget to display a popup menu button very simply and easily customizable. Resources Documentation Pub Package GitHub Repository I

Sep 27, 2022

Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.

Flutter permission_handler plugin The Flutter permission_handler plugin is build following the federated plugin architecture. A detailed explanation o

Dec 31, 2022

Klutter plugin makes it possible to write a Flutter plugin for both Android and iOS using Kotlin only.

The Klutter Framework makes it possible to write a Flutter plugin for both Android and iOS using Kotlin Multiplatform. Instead of writing platform spe

Dec 18, 2022

FLUTTER API: Video Editor allows trim, crop, rotate and scale video with a super flexible UI Design

FLUTTER API: Video Editor allows trim, crop, rotate and scale video with a super flexible UI Design

video_editor My other APIs Scroll Navigation Video Viewer Helpers Features Super flexible UI Design. Support actions: Crop Trim Scale Rotate Cover sel

Dec 26, 2022

A Flutter widget to crop images.

A Flutter widget to crop images.

image_crop_widget A Flutter widget to crop images. The widget is completely written in Dart and has minimal dependencies. The widget displays the imag

Nov 29, 2022

A Flutter plugin to use iOS 16.1+ Live Activities ⛹️ & iPhone 14 Pro Dynamic Island ⚫️ features

A Flutter plugin to use iOS 16.1+ Live Activities ⛹️ & iPhone 14 Pro Dynamic Island ⚫️ features

Live Activities A Flutter plugin to use iOS 16.1+ Live Activities & iPhone 14 Pro Dynamic Island features. 🧐 What is it ? This plugin use iOS Activit

Dec 26, 2022

This is just the simplyfied Flutter Plugin use for one of the popular flutter plugin for social media login.

social_media_logins Flutter Plugin to login via Social Media Accounts. Available Social Media Logins: Facebook Google Apple Getting Started To use thi

Aug 24, 2022

A completely Responsive Image Editor App- Works on Android & iOS

A completely Responsive Image Editor App- Works on Android & iOS

Image Editor App Developed using Flutter with No Plugins (except for picking and saving images)

Dec 16, 2022
Owner
null
Flutter plugin, support android/ios.Support crop, flip, rotate, color martix, mix image, add text. merge multi images.

image_editor The version of readme pub and github may be inconsistent, please refer to github. Use native(objc,kotlin) code to handle image data, it i

FlutterCandies 317 Jan 3, 2023
Album Image is based in photo_manager package and has the same concept as image_picker but with a more attractive interface to choose an image or video from the device gallery, whether it is Android or iOS

Album Image is based in photo_manager package and has the same concept as image_picker but with a more attractive interface to choose an image or vide

Phuong Vu 2 Oct 13, 2022
This is a flutter plugin to detect edges in a live camera, take the picture of detected edges object, crop it, and save.

edge_detection A flutter plugin to detect edges of objects, scan paper, detect corners, detect rectangles. It allows cropping of the detected object i

Sawan Kumar Bundelkhandi 180 Dec 28, 2022
A Flutter sensor plugin which provide easy access to the Pitch and Roll on Android and iOS devices.

Flutter Aeyrium Sensor Plugin Aeyrium Sensor Plugin A Flutter sensor plugin which provide easy access to the Pitch and Roll on Android and iOS devices

Aeyrium 58 Nov 3, 2022
A flutter widget to indicate loading progress. Easy to use, easy to extend

?? ?? ?? A flutter widget to indicate loading progress. Easy to use, easy to extend

Manuel Duarte 2 May 30, 2022
Flutter plugin for selecting images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotation, cropping, adding sticker/text/filters.

advance_image_picker Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edi

Weta Vietnam 91 Dec 19, 2022
A Flutter plugin that provides assets abstraction management APIs without UI integration, you can get assets (image/video/audio) on Android, iOS and macOS.

photo_manager Photo/Assets management APIs for Flutter without UI integration, you can get assets (image/video/audio) from Android, iOS and macOS. 提供相

FlutterCandies 526 Jan 4, 2023
A TabBarController that is easy to use for flutter developers. 🥰 It supports various styles of page navigation, and you can also use it to customize your favorite styles. 🍻🍻

easy_tab_controller A user-friendly TabBarController widget for flutter developer. Getting Started This project is a starting point for a Flutter plug

圆号本昊 3 May 26, 2022
A very easy-to-use navigation tool/widget for having iOS 13 style stacks.

cupertino_stackview A very easy-to-use navigation tool/widget for having iOS 13 style stacks. It is highly recommended to read the documentation and r

AliYigitBireroglu 49 Nov 18, 2022