ImageOptionsMenu causes error if the image dimensions are greater than the users screensize.
Is there an existing issue for this?
- [X] I have searched the existing issues
Flutter Quill version
9.3.4
Steps to reproduce
Setup: On web, have your browser maximized. Get an image that is the same resolution as your monitor.
- Click the insert image button in the Quill Editor.
- Select the image from the setup phase.
- Click on the image and select resize.
- Resize the image to the maximum size allowed.
- Click away so that the dialog goes away.
- Resize the window to a smaller size.
- Click on the image again and select resize.
- The error below will popup. This happens because the max size allowed in the slider is restricted to the screen size.
Expected results
An error should not appear and the max should be set to the max image size if greater than the screen size.
Actual results
The following error will appear whenever the screen is resized. This is critical when saving an image that could be opened on different sized screens.
Code sample
Code sample
QuillEditor.basic(
configurations: QuillEditorConfigurations(
controller: quillPrefilledController,
embedBuilders: kIsWeb
? FlutterQuillEmbeds.editorWebBuilders()
: FlutterQuillEmbeds.editorBuilders(),
minHeight: quillEditorMinHeight,
maxHeight: double.infinity,
padding: const EdgeInsets.all(4.0),
expands: false,
),
);
Additional Context
Screenshots / Video demonstration
[Upload media here]
Logs
[Paste your logs here]
Can you try the latest version? 10.6.0 or newer versions?
We are waiting for one more of out dependencies to upgrade to using Web 1.0. Once that is done, I can try it. I did look a the source code in the latest version and there didn't appear to be any changes to this file.
I tested this on 10.7.5 and was still able reproduce this issue.
It looks like the image resize functionality is broken, just like the image saved previously (see #2403). We will need to rewrite flutter_quill_extensions fully.