Quill editor overflows ConstrainedBox
Is there an existing issue for this?
- [X] I have searched the existing issues
Flutter Quill version
9.3.5
Steps to reproduce
I use the following widget to render the editor contents within a constrained box, within a Card. The Card shows that the contrainedBox is working: it grows with the contents up to the desired 300 height. The text from the editor however somehow overflows the sizedBox (to the bottom) and extends to the full length of the available text, well beyond the 300.
Card(child:
ConstrainedBox(
constraints: const BoxConstraints(minHeight: 0, maxHeight: 300),
child: QuillEditor.basic(
focusNode: focusNode,
scrollController: scrollController,
configurations: QuillEditorConfigurations(
scrollable: false,
expands: false,
controller: controller,
sharedConfigurations:
QuillSharedConfigurations(locale: Localizations.localeOf(context)),
),
)
)
Expected results
Expect the editor to stay within the parent ConstrainedBox
Actual results
Editor overflows the ContrainedBox (and Card)
Code sample
Card(child:
ConstrainedBox(
constraints: const BoxConstraints(minHeight: 0, maxHeight: 300),
child: QuillEditor.basic(
focusNode: focusNode,
scrollController: scrollController,
configurations: QuillEditorConfigurations(
scrollable: false,
expands: false,
controller: controller,
sharedConfigurations:
QuillSharedConfigurations(locale: Localizations.localeOf(context)),
),
)
)
Screenshots or Video
No response
Logs
No response
You can using maxHeigh, minHeight in QuillEditor alternative for ConstrainedBox
Thanks - it affects the height communicated to the parent (a Card widget in my case, which shrinks to the size set by maxHeight) but the actual text is still visible below the card, so this does not solve the problem. See screenshot
That my mistake, with the new issue, u can wrapCard by a ClipRRect
If still have issues, please comment with a mention of me