Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingPluginException memoryToMemory for web #67

Open
tk2232 opened this issue Aug 1, 2021 · 0 comments
Open

MissingPluginException memoryToMemory for web #67

tk2232 opened this issue Aug 1, 2021 · 0 comments
Labels
handle: welcome PR welcome pull request platform: web type: feature New feature or request

Comments

@tk2232
Copy link

tk2232 commented Aug 1, 2021

It seems that no native code has been implemented for web.

I got following exception:

MissingPluginException(No implementation found for method memoryToMemory on channel top.kikt/flutter_image_editor)

Here is my code

    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!));
    option.outputFormat = OutputFormat.png(88);

    final result = await ImageEditor.editImage(
      image: img,
      imageEditorOption: option,
    );

    return result;
  }
@CaiJingLong CaiJingLong changed the title MissingPluginException memoryToMemory MissingPluginException memoryToMemory for web Feb 14, 2023
@CaiJingLong CaiJingLong added handle: welcome PR welcome pull request platform: web type: feature New feature or request labels Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
handle: welcome PR welcome pull request platform: web type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants