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

Does not work in Cupertino apps #61

Closed
paldepind opened this issue Sep 26, 2023 · 6 comments
Closed

Does not work in Cupertino apps #61

paldepind opened this issue Sep 26, 2023 · 6 comments
Assignees

Comments

@paldepind
Copy link

Attempting to use WoltModalSheet in a Cupertino app results in an error like the following:

The following assertion was thrown building WoltBottomSheetDragHandle(dirty, dependencies: [_LocalizationsScope-[GlobalKey#bacba]]):
No MaterialLocalizations found.

WoltBottomSheetDragHandle widgets require MaterialLocalizations to be provided by a Localizations widget ancestor.
The material library uses Localizations to generate messages, labels, and abbreviations.

To introduce a MaterialLocalizations, either use a MaterialApp at the root of your application to include them automatically, or add a Localization widget with a MaterialLocalizations delegate.

The specific widget that could not find a MaterialLocalizations ancestor was: WoltBottomSheetDragHandle
    dirty
    dependencies: [_LocalizationsScope-[GlobalKey#bacba]]
The ancestors of this widget were
    CupertinoTabScaffold
        dependencies: [CupertinoUserInterfaceLevel, MediaQuery, UnmanagedRestorationScope, _InheritedCupertinoTheme]
        state: _CupertinoTabScaffoldState#40ad1
    HomePage
        dependencies: [_CupertinoTabPageStateProvider]
    CupertinoApp
        dependencies: [MediaQuery]
        state: _CupertinoAppState#0015d

It seems that the modal requires MaterialLocalizations to be provided by a Localizations widget whereas a Cupertino app has a CupertinoLocalizations instance provided by Localizations.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 27, 2023
@paldepind
Copy link
Author

This issue is still present AFAIK.

@github-actions github-actions bot removed the Stale label Oct 30, 2023
@yunusemrebakir
Copy link
Collaborator

Hey @paldepind, can you try Remi's suggestion from here and let us know if it helps?

@paldepind
Copy link
Author

Sorry, I'm using a different package now that works with Cupertino.

If you're not interested in supporting Cupertino for this package I would suggest simply stating this in the readme :)

Copy link

This issue is stale because it has been open 30 days with no activity. Remove "Stale" label or comment or this will be closed in 7 days.

@ulusoyca
Copy link
Collaborator

@paldepind We released 0.3.0 with instructions on how to use CupertinoApp within the ReadMe file. This is the #120 merged.

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

3 participants