Previews on widgets with localization. #14
Unanswered
adrncastro
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there, I’m have been using doc widget for a bit, it's really a great easy to use tool, but I ran into a little issue with some specific widgets I’m trying to create previews of.
I created a new target to run a different main() like the read-me suggested, I used Provider to inject my custom theme on the widget tree and everything is working well, except when I try creating previews of widgets that use localized strings. I added the MaterialApp widget to the doc widget’s main() and added the l10n delegates, but for some reason no instance of the localization manager is found on the widget tree, which is weird since the injected theme is properly found in the context. Any ideas of what could be going wrong?
Attached a pic of how I'm setting up the runApp() in the doc wigets main():

And of the error:

Beta Was this translation helpful? Give feedback.
All reactions