pro_image_editor 11.1.1 copy "pro_image_editor: ^11.1.1" to clipboard
pro_image_editor: ^11.1.1 copied to clipboard

A Flutter image editor: Seamlessly enhance your images with user-friendly editing features.

Logo

pub package Sponsor License GitHub issues Web Demo

The ProImageEditor is a Flutter widget designed for image editing within your application. It provides a flexible and convenient way to integrate image editing capabilities into your Flutter project.

Demo Website

Table of contents #

Preview #

Grounded-Design Frosted-Glass-Design WhatsApp-Design
Grounded-Design Frosted-Glass-Design WhatsApp-Design
Ai-Commands Ai-Remove-Background Ai-Replace-Background
Ai-Commands Ai-Remove-Background Ai-Replace-Background
Paint-Editor Text-Editor Crop-Rotate-Editor
Paint-Editor Text-Editor Crop-Rotate-Editor
Filter-Editor Emoji-Editor Sticker/ Widget Editor
Filter-Editor Emoji-Editor Sticker-Widget-Editor

Features #

๐Ÿงฉ Editor Modules #

  • ๐ŸŽจ Paint Editor: Draw freehand with various brushes, shapes (like circles and arrows), and apply blur or pixelation for censoring.
  • ๐Ÿ…ฐ๏ธ Text Editor: Add and style text with full customization.
  • โœ‚๏ธ Crop & Rotate Editor: Crop, flip, and rotate images with ease.
  • ๐ŸŽ›๏ธ Tune Adjustments: Adjust brightness, contrast, saturation, and more.
  • ๐Ÿ“ธ Filter Editor: Apply custom or predefined image filters.
  • ๐Ÿ’ง Blur Editor: Add blur to any part of the image.
  • ๐Ÿ˜€ Emoji Picker: Quickly insert emojis into your design.
  • ๐Ÿ–ผ๏ธ Sticker Editor: Add and manage custom image stickers.

๐Ÿš€ Performance & Architecture #

  • ๐Ÿงต Multi-Threading
    • Use isolates for background tasks on native platforms.
    • Use web workers for background tasks in web environments.
    • Auto- or manually configure the number of active background processors based on device capabilities.

๐Ÿ› ๏ธ Core Features #

  • ๐Ÿ–ผ๏ธ Flexible Image Input: Load images from memory, assets, files, or network.
  • ๐ŸŒ i18n Support: Translate every string in the UI.
  • ๐ŸŽš๏ธ Per-Editor Configuration: Each module offers extensive customization options.
  • ๐Ÿงฑ Fully Customizable: Swap icons, styles, and widgets for any subeditor.
  • ๐Ÿ“ Helper Lines: Snap and align objects more accurately.
  • โ†ฉ๏ธ Undo/Redo support for non-destructive editing.
  • ๐Ÿ” Movable Background Image: Position the base image as needed.
  • ๐Ÿ”€ Reorder Layers: Change layer stacking order dynamically.
  • ๐ŸŽฏ Interactive Layers: Select and manipulate each element with precision.
  • ๐Ÿ–Œ๏ธ Hit Detection: Paint layers support interactive selection.
  • ๐Ÿ” Zoom Support: Zoom in/out in both paint and main editor views.
  • ๐Ÿ–ฑ๏ธ Enhanced Desktop UX: Fine-tuned movement and scaling on desktop platforms.
  • ๐Ÿงฒ Multiselect Support: Select multiple elements at once.

๐ŸŽจ Themes #

  • ๐Ÿชต Grounded Theme
  • ๐ŸงŠ Frosted Glass Theme
  • ๐Ÿ’ฌ WhatsApp Theme

๐Ÿ”— Integration #

  • ๐Ÿค– AI Assistant: Integrate ChatGPT, Gemini, or other AI models to assist with image editing via smart suggestions or direct commands.
  • ๐ŸŽฅ Video Editor: Seamlessly combine image and video editing workflows.

Setup #

Web

Show web setup

If you're displaying emoji on the web and want them to be colored by default (especially if you're not using a custom font like Noto Emoji), you can achieve this by adding the useColorEmoji: true parameter to your flutter_bootstrap.js file, as shown in the code snippet below:

{{flutter_js}}
{{flutter_build_config}}

_flutter.loader.load({
    serviceWorkerSettings: {
        serviceWorkerVersion: {{flutter_service_worker_version}},
    },
    onEntrypointLoaded: function (engineInitializer) {
      engineInitializer.initializeEngine({
        useColorEmoji: true, // add this parameter
        renderer: 'canvaskit'
      }).then(function (appRunner) {
        appRunner.runApp();
      });
    }
});

The HTML renderer is not supported in the image editor and has been completely removed in Flutter version >= 3.29.0. However, if you are using an older Flutter version < 3.29, please ensure that you enforce the canvas renderer.

To enable the Canvaskit renderer by default, you can do the following in your flutter_bootstrap.js file.

{{flutter_js}}
{{flutter_build_config}}

_flutter.loader.load({
    serviceWorkerSettings: {
        serviceWorkerVersion: {{flutter_service_worker_version}},
    },
    onEntrypointLoaded: function (engineInitializer) {
      engineInitializer.initializeEngine({
        useColorEmoji: true,
        renderer: 'canvaskit' // add this parameter
      }).then(function (appRunner) {
        appRunner.runApp();
      });
    }
});

You can view the full web example here.

Android, iOS, macOS, Linux, Windows

No additional setup required.


Usage #

import 'package:pro_image_editor/pro_image_editor.dart';

@override
Widget build(BuildContext context) {
  return ProImageEditor.network(
    'https://picsum.photos/id/237/2000',
    callbacks: ProImageEditorCallbacks(
      onImageEditingComplete: (Uint8List bytes) async {
        /*
          Your code to process the edited image, such as uploading it to your server.

          You can choose to use await to keep the loading dialog visible until 
          your code completes, or run it without async to close the loading dialog immediately.

          By default, the image bytes are in JPG format.
        */
        Navigator.pop(context);
      },
        /* 
        Optional: If you want haptic feedback when a line is hit, similar to WhatsApp, 
        you can use the code below along with the vibration package.

          mainEditorCallbacks: MainEditorCallbacks(
            helperLines: HelperLinesCallbacks(
              onLineHit: () {
                Vibration.vibrate(duration: 3);
              }
            ),
          ),
        */
    ),
  );
}

Designs

The editor offers three prebuilt designs:

Extended-Configurations

The editor provides extensive customization options, allowing you to modify text, icons, colors, and widgets to fit your needs. It also includes numerous callbacks for full control over its functionality.

Check out the web demo to explore all possibilities. You can find the example code for all demos here.

Video-Editor #

The editor supports full video generation on Android, iOS, and macOS. Support for Windows and Linux is coming soon.

To keep the image editor lightweight, youโ€™ll need to manually add the video player package of your choice. For rendering the video, you can use my package pro_video_editor, which is also used in the example.

An example of how to implement the video editor with a specific video player can be found here, and a simpler example using just the default video_player is available here.

Sponsors #

Included Packages #

A big thanks to the authors of these amazing packages.

Contributors #

Made with contrib.rocks.

441
likes
160
points
24.7k
downloads
screenshot

Publisher

verified publisherwaio.ch

Weekly Downloads

A Flutter image editor: Seamlessly enhance your images with user-friendly editing features.

Repository (GitHub)
Contributing

Topics

#image-editor #image #photo #picture #editor

Documentation

Documentation
API reference

Funding

Consider supporting this project:

github.com

License

BSD-3-Clause (license)

Dependencies

flutter, http, plugin_platform_interface, shared_preferences, vector_math, web

More

Packages that depend on pro_image_editor