Closed kokocooler2020 closed 4 years ago
The problem because flutter plugin(have native code) is not support hot restart/hot reload. So you must exit app and rerun.
I got the same error on web. Even when I rerun the app
Here is my code
Future<Uint8List?> cropImage(ExtendedImageEditorState state) async {
var action = state.editAction;
///crop rect base on raw image
final Rect? rect = state.getCropRect();
final rotateAngle = action?.rotateAngle.toInt();
final flipHorizontal = action?.flipY;
final flipVertical = action?.flipX;
final img = state.rawImageData;
ImageEditorOption option = ImageEditorOption();
if (action!.needCrop) option.addOption(ClipOption.fromRect(rect!));
if (action.needFlip)
option.addOption(
FlipOption(horizontal: flipHorizontal!, vertical: flipVertical!));
if (action.hasRotateAngle) option.addOption(RotateOption(rotateAngle!));
final result = await ImageEditor.editImage(
image: img,
imageEditorOption: option,
);
return result;
}
I have the same problem. Exit and return doesnt help. I also tried "Flutter clean" but it still doesnt work.
Had the same issue, the reason is this plugin doesn't support web. We need to use cropImageDataWithDartLibrary on web
flutter channel: dev (Flutter Web).
when run code below on Flutter Web: final editorOption = editor.ImageEditorOption(); editorOption.addOption(editor.RotateOption(-90)); editorOption.outputFormat = editor.OutputFormat.jpeg(100); Future list = editor.ImageEditor.editImage(image: imageData.srcImageBytes, imageEditorOption: editorOption);
i got: Overflow on channel: top.kikt/flutter_image_editor. Messages on this channel are being discarded in FIFO fashion. The engine may not be running or you need to adjust the buffer size if of the channel. Error: MissingPluginException(No implementation found for method memoryToMemory on channel top.kikt/flutter_image_editor)
any body help please, thank you.