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

Widgetbook app throws exception when theme is toggled #45

Closed
jenshor opened this issue Oct 26, 2021 · 0 comments · Fixed by #48
Closed

Widgetbook app throws exception when theme is toggled #45

jenshor opened this issue Oct 26, 2021 · 0 comments · Fixed by #48
Assignees
Labels
t: bug Something isn't working

Comments

@jenshor
Copy link
Member

jenshor commented Oct 26, 2021

If only one theme is defined, the Widgetbook app throws flutter exceptions when toggling the theme. The app continues running, but the exceptions are distracting - especially if you have debugging of packages enabled.

Packages

  • widgetbook

the error occurred in combination with widgetbook_generator but there is no reason to believe this is actually caused by the widgetbook_generator package.

Suggested solution

  • Disable the toggle Theme button if only one theme is defined
    It doesnt really make sense to default to the default theme of widgetbook.
  • Add a tooltip explaining why the button is enabled
  • Start the Widgetbook app in the theme that was defined (currently always defaults to dark theme)
@jenshor jenshor added the t: bug Something isn't working label Oct 26, 2021
@jenshor jenshor self-assigned this Oct 26, 2021
@jenshor jenshor linked a pull request Oct 28, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant