-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
[Proposal] Show error before runtime when using color param AND decoration param at the same time #133456
Comments
Thanks for the report @Fernandomr88 The one you highlighted related to Container is actually a code implementation issue which has been documented for reference:
I am not sure if the tool / framework will be able to identify whether |
I see, can it at least be detected during compile time or even by linter? This could prevent some issues during production time, since that problem is only detected when that widget is rendered |
I think there's no way to ensure that an assert is run at compile time. I see this similar issue you can check for reference which probably talks about same case as yours but just for another widget. |
How about at flutter linter? 🤔 My point is that this could prevent problems, exceptions and crashes at runtime |
You may file a proposal for that package https://pub.dev/packages/flutter_lints. Although it'll be in same repo as this, but just using the package template. |
done |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Is there an existing issue for this?
Use case
Whenever you're implementing a
Container
for example and you use bothcolor
anddecoration
at the same time, there's no error shown but an exception is thrown only when the widget is built in runtime, not even on compilation.Code example:
Proposal
My proposal is that the error is shown on "coding time", just as any errors that are shown such as this one for example:
The text was updated successfully, but these errors were encountered: