easy_image_editor 1.0.3
easy_image_editor: ^1.0.3 copied to clipboard
Easy Image Editor is usefull for add any widget and move, resize and set over the main image or color
Easy Image Editor #
EasyImageEditor use for add any kind of widget over the background image or color and move that widget, resize, rotate.
Features #
- change editor background color.
- add any widget as background in editor.
- add any widget over the editor.
- move, resize, flip, zoom and rotate added widget.
- update added widget with another widget.
- allow undo and redo.
- allow single and multiple selection.
- allow change border color and remove icon.
- remove added widget.
- 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 #
borderColoruse for set border color of widget default valueColors.black.removeIconset remove icon of widget default valueIcon(Icons.cancel).onViewTouchthis event call when widget touch.onViewTouchOverthis event call when widget touch remove.addBackgroundColorset background color of editor.addBackgroundViewset background color of editor. it will overlap background color.addViewadd any kind of view over the editor.updateViewupdate added view in editor.canEditMultipleViewset edit selection mode multiple or single default valuetrue.hideViewControlit will hide borders and remove icons of all added widget.showViewControlit will show borders and remove icons of all added widget.onClickthis event call when widget click.clickToFocusAndMoveif you set true then any widget move, rotate, zoom by touch when user click's on default valuefalse.moveViewmove widget over the editor programmatically.rotateViewrotate widget over the editor programmatically.zoomInOutViewzoom in or out widget over the editor programmatically.flipViewflip vertical or horizontal widget over the editor programmatically.updateMatrixupdate widget matrix over the editor programmatically like your way.