rajeshbdabhi / easy_image_editor

Easy Image Editor is usefull for add any widget and move, resize and set over the main image or color
MIT License
13 stars 6 forks source link

Easy Image Editor

pub.dev version Platform support MIT License Badge Flutter Platform Badge

EasyImageEditor use for add any kind of widget over the background image or color and move that widget, resize, rotate.

screenshot

Features

1) change editor background color. 2) add any widget as background in editor. 3) add any widget over the editor. 4) move, resize, flip, zoom and rotate added widget. 5) update added widget with another widget. 6) allow undo and redo. 7) allow single and multiple selection. 8) allow change border color and remove icon. 9) remove added widget. 10) handle all action manually

Getting started

First, add easy_image_editor as a dependency in your pubspec.yaml file. then add this line in your file import 'package:easy_image_editor/easy_image_editor.dart';

Usage

    import 'package:easy_image_editor/easy_image_editor.dart';

    class _MyHomePageState extends State<MyHomePage> {
        late EasyImageEditorController _easyImageEditorController;
        ...

        @override
        void initState() {
            super.initState();
            ...
        }
        ...

        @override
        Widget build(BuildContext context) {
            return Scaffold(
                    ...
                    body: EditorView(
                                onInitialize: (controller) {
                                  setState(() {
                                    _easyImageEditorController = controller;
                                  });
                                },
                          ),
                    ...
            );
        }
        ...
    }

for more detail and usage see /example/lib/main.dart

Additional information

1) borderColor use for set border color of widget default value Colors.black. 2) removeIcon set remove icon of widget default value Icon(Icons.cancel). 3) onViewTouch this event call when widget touch. 4) onViewTouchOver this event call when widget touch remove. 5) addBackgroundColor set background color of editor. 6) addBackgroundView set background color of editor. it will overlap background color. 7) addView add any kind of view over the editor. 8) updateView update added view in editor. 9) canEditMultipleView set edit selection mode multiple or single default value true. 10) hideViewControl it will hide borders and remove icons of all added widget. 11) showViewControl it will show borders and remove icons of all added widget. 12) onClick this event call when widget click. 13) clickToFocusAndMove if you set true then any widget move, rotate, zoom by touch when user click's on default value false. 14) moveView move widget over the editor programmatically. 15) rotateView rotate widget over the editor programmatically. 16) zoomInOutView zoom in or out widget over the editor programmatically. 17) flipView flip vertical or horizontal widget over the editor programmatically. 18) updateMatrix update widget matrix over the editor programmatically like your way.