-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[ Widget Preview ] Throw ToolExit if Flutter Web is not enabled
#178500
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
Conversation
If Flutter Web is not enabled, the widget previewer will crash when trying to find a web device to launch with. This change explicitly checks for this case and throws `ToolExit` with instructions to enable Flutter Web if it's not enabled. Fixes #178486
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds a check to the widget preview command to ensure that Flutter Web is enabled. If it is not, the command now exits with a helpful error message instructing the user on how to enable it. This prevents a crash that would otherwise occur when no web devices can be found. The change also includes a new test case to verify this behavior. The implementation is correct and improves the user experience for the widget preview feature.
jyameo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…utter#178500) If Flutter Web is not enabled, the widget previewer will crash when trying to find a web device to launch with. This change explicitly checks for this case and throws `ToolExit` with instructions to enable Flutter Web if it's not enabled. Fixes flutter#178486
…utter#178500) If Flutter Web is not enabled, the widget previewer will crash when trying to find a web device to launch with. This change explicitly checks for this case and throws `ToolExit` with instructions to enable Flutter Web if it's not enabled. Fixes flutter#178486
…utter#178500) If Flutter Web is not enabled, the widget previewer will crash when trying to find a web device to launch with. This change explicitly checks for this case and throws `ToolExit` with instructions to enable Flutter Web if it's not enabled. Fixes flutter#178486
…utter#178500) If Flutter Web is not enabled, the widget previewer will crash when trying to find a web device to launch with. This change explicitly checks for this case and throws `ToolExit` with instructions to enable Flutter Web if it's not enabled. Fixes flutter#178486
…utter#178500) If Flutter Web is not enabled, the widget previewer will crash when trying to find a web device to launch with. This change explicitly checks for this case and throws `ToolExit` with instructions to enable Flutter Web if it's not enabled. Fixes flutter#178486
If Flutter Web is not enabled, the widget previewer will crash when trying to find a web device to launch with. This change explicitly checks for this case and throws
ToolExitwith instructions to enable Flutter Web if it's not enabled.Fixes #178486