Skip to content

Library can't find Localizations if the toolbar is in a modal or popup #2622

@alex-24

Description

@alex-24

Have you checked for an existing issue?

Flutter Quill Version

11.4.2

Steps to Reproduce

  1. Use a QuillSimple toolbar inside a popup or modal

Expected results

There should not be an error.

We could have constructor parameter to set the localizations manually instead of relying on FlutterQuillLocalizations.of(this). That field would then be defaulted to FlutterQuillLocalizations.delegate

Actual results

In case where we use the toolbar from inside a popup or modal the build context is not a child of MaterialApp as such we always get MissingFlutterQuillLocalizationException despite the app being set up correctly. The toolbar is unusable at this point.

As a workaround we can wrap each popup with MaterialApp but it is not practical.

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions