-
Notifications
You must be signed in to change notification settings - Fork 555
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
assert() shows opaque error #1966
Comments
Here's an updated example - this was filed before the framework was updated to null safety, so most of the asserts in the framework can't be hit anymore. |
Filed flutter/flutter#92191 to track unnecessary asserts in the SDK |
I can see the assertion failure message appear in the browser DevTools console. Is this just a matter of surfacing those messages in the DartPad console? |
Yes that would help. We should probably show the red error widget too. I'm not sure if dart-archive/dart-services#737 would help with that, or if the issue is just how the frontend is handling the error. |
Gathered a bit more on this: the assertion failure in the example should be one of the VisualDensity constructor's asserts, but the assertion that triggers is:
Here's the line where the assert is defined: https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/framework.dart#L2535 This is happening on the dart-services master branch and dart-archive/dart-services#737. |
Consolidating issue in to #3008 alongside other error surfacing improvements. Thanks for the discussion and investigation here! |
When an
assert()
statement fails, "Script error." appears in the console.We should investigate if
assert
statements should be enabled in DartPad, and how to display a more helpful error.Related issues:
Colors.black
as a primarySwatch causes an opaque error #1650The text was updated successfully, but these errors were encountered: