rotate pictures
support android ios, use the native way to flip, crop, rotate pictures.
screenshot
usage
import
import 'package:image_editor/image_editor.dart';
initial plugin (must do it):
void main(){
runapp();
/// init plugin
imageeditor.initialplugin();
}
// or
void main() {
widgetsflutterbinding.ensureinitialized();
imageeditor.initialplugin();
runapp(myapp());
}
// this method initializes a cache directory for subsequent operations, you can call it before you want to use this plugin.
method list:
imageeditor.editimage();
imageeditor.editfileimage();
imageeditor.editfileimageandgetfile();
imageeditor.editimageandgetfile();
imageeditor method params
name | description |
---|---|
image | dart.typed_data.uint8list |
file | dart.io.file |
imageeditoroption | flutter_image_editor.imageeditoroption |
imageeditoroption
final editoroption = imageeditoroption();
editoroption.addoption(flipoption());
editoroption.addoption(clipoption());
editoroption.addoption(rotateoption());
option
flip
flipoption(horizontal:true, vertical:false);
clip
clipoption(x:0, y:0, width:1920, height:1920);
rotate
rotateoption(degree: 180);
Comments are closed.