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

Cropper Overflow on Web with all 4 WebViewMode #529

Open
stephenriska123 opened this issue Oct 3, 2024 · 4 comments
Open

Cropper Overflow on Web with all 4 WebViewMode #529

stephenriska123 opened this issue Oct 3, 2024 · 4 comments

Comments

@stephenriska123
Copy link

I have tried all 4 WebViewModes and none of them resize the copper to fit. Am I misunderstanding what this does? Is there a better way to constrain the cropper to fit on the screen?

CroppedFile? cropped = await _cropper.cropImage(
  sourcePath: image.path,
  aspectRatio: const CropAspectRatio(ratioX: 1, ratioY: 1),
  compressFormat: ImageCompressFormat.png,
  maxHeight: 500,
  maxWidth: 500,
  uiSettings: [
    WebUiSettings(
      context: context,
      viewwMode: WebViewMode.mode_1,
    )
  ],
);
Screenshot 2024-10-02 at 8 22 13 PM
@FlautistaMacabro
Copy link

Same problem here.

@sharmavishal914
Copy link

same issue for me too

@max-anders
Copy link

same issue on smaller monitors or after resizing the window. I reduced the likelihood of this problem by specifying in the WebUiSettings

size: const CropperSize(
width: 350,
height: 350,
),

One potential solution might be to embed the cropper in a ListView to handle resizing better

@stephenriska123
Copy link
Author

I have a workaround that seems to fit most screen sizes, but its not perfect.

WebUiSettings(
  context: context,
  size: CropperSize(
    height: MediaQuery.of(context).size.height ~/ 2,
  ),
),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants