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

Overflow ERROR in flutter_quill toolbar menus #1891

Open
1 task done
Abner-Jaasiel opened this issue May 23, 2024 · 1 comment
Open
1 task done

Overflow ERROR in flutter_quill toolbar menus #1891

Abner-Jaasiel opened this issue May 23, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@Abner-Jaasiel
Copy link

Abner-Jaasiel commented May 23, 2024

Is there an existing issue for this?

The question

The default button menus of QuillSimpleToolbar appear below the keyboard. This is strange since it didn't happen in previous versions.

return Column(
  children: [
    QuillEditorWidget(
      padding: padding,
      newNote: newNote,
      quillController: _quillController,
    ),
    QuillSimpleToolbar(
      configurations: QuillSimpleToolbarConfigurations(
        controller: _quillController,
        toolbarSectionSpacing: 10.0,
      ),
    ),


  ],
);

enter image description here

enter image description here

In previous versions, I used the QuillToolbar widget, which lost some parameters, and I didn't understand its new logic very well. So, I tried to find other options like QuillToolbar.simple, but I also missed some parameters until I managed to find QuillSimpleToolbar, which had the same parameters. I only had to copy and paste my code. Then I encountered the mentioned error, which I'm sure also happened with the previous widgets. I tried various ways but couldn't achieve anything. I wonder... maybe flutter_quill implemented some parameter to overlay the internal menus of the toolbar, and I can't find it...

Some more changes: Due to updates, flutter_quill removed the QuillProvider widget, which might have something to do with it or not... in this case, I have removed it and only left a column with the editor and the toolbar.

before:

return QuillProvider(
  configurations: QuillConfigurations(
    controller: _quillController,
    sharedConfigurations: QuillSharedConfigurations(
      locale: Locale(S.current.code_locate),
    ),
  ),
  child: Column(
    children: [
      QuillEditorWidget(
        padding: padding,
        newNote: newNote,
        quillController: _quillController,
      ),
      QuillToolbarWidget(
        scrollController: scrollController,
        quillController: _quillController,
        noteId: noteId,
        newNote: newNote,
      ),
    ],
  ),
);

now:

return Column(
  children: [
    QuillEditorWidget(
      padding: padding,
      newNote: newNote,
      quillController: _quillController,
    ),
    QuillSimpleToolbar(
      configurations: QuillSimpleToolbarConfigurations(
        controller: _quillController,
        toolbarSectionSpacing: 10.0,
      ),
    ),


  ],
);

These are some of the changes I made in the new version of flutter_quill.

Also with the aim of finding an alternative solution, I placed another "gesturedetector" widget on top of the toolbar widget. The gesture was not detected in onTap(){FocusScope.of(context).unfocus();} in the items, I guess because the widget stops working when the onPress already exists on it

packages:
https://pub.dev/packages/flutter_quill

@Abner-Jaasiel Abner-Jaasiel added the help wanted Extra attention is needed label May 23, 2024
@salba360496
Copy link
Contributor

wrap the QuillEditorWidget in expanded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants