-
Notifications
You must be signed in to change notification settings - Fork 28.6k
EXCEPTION CAUGHT BY WIDGETS LIBRARY #21042
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
Comments
Please add the output of Looks like a dup of dart-lang/sdk#33076 |
Thanks @zoechi, I have been said "Dart 2 uses what is call "strong mode" flag by default, in other words, you need to avoid to not properly type your variables." If you want to reproduce the error just paste the code used which is in the error_radios.txt I joined at the end of my initial post. |
a sample of flutter doctor -v C:\Users\TOTO>flutter doctor -v [√] Android toolchain - develop for Android devices (Android SDK 28.0.2) [√] Android Studio (version 3.1) [√] Connected devices (1 available) • No issues found! C:\Users\TOTO> |
Hope it can help, I am too much beginner to understand. But, apparently before this revision c7ea3ca things were different and it was not necessary to change List radiosList = new List(); by List radiosList = List(); |
Because your log was not wrapped in ``` the |
You just need to change List radiosList = new List(); to List radiosList = new List<Widget>(); or List<Widget> radiosList = new List<Widget>(); or List<Widget> radiosList = []; or var /* or final */ radiosList = <Widget>[]; |
yes, thank you. Can we expect a clearer error message when it occurs? Le lundi 27 août 2018 à 08:10:05 UTC+2, Günter Zöchbauer <[email protected]> a écrit :
You just need to change
List radiosList = new List();
to
List radiosList = new List<Widget>();
or
List<Widget> radiosList = new List<Widget>();
or
List<Widget> radiosList = [];
or
var /* or final */ radiosList = <Widget>[];
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Any suggestion? I found the error message is clear. |
Oh sorry, I am not meaning your answer is not clear, I just mean that 'EXCEPTION CAUGHT BY WIDGETS LIBRARY' can be misleading for beginners. Perhaps in the future as soon as your code will be wrong as mine was, AS will tell you that your variable should be more precise.Anyway, thank you very very much for your help :) Le lundi 27 août 2018 à 11:11:34 UTC+2, Günter Zöchbauer <[email protected]> a écrit :
Any suggestion? I found the error message is clear.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I see what you mean.
Is reported because Flutter acts as a framework that calls your code and it runs into an error when doing that. I meant
should give a pretty good hint at what is wrong. |
Many thanks for this reassuring and clear answer. Up to me now to learn deeper. I think you really answered to all my beginner's concerns and reactions. The thread can be peacefully closed now :). Le lundi 27 août 2018 à 12:06:25 UTC+2, Günter Zöchbauer <[email protected]> a écrit :
I see what you mean.
EXCEPTION CAUGHT BY WIDGETS LIBRARY
Is reported because Flutter acts as a framework that calls your code and it runs into an error when doing that.
I meant
type 'List' is not a subtype of type 'List'
should give a pretty good hint at what is wrong.
As you see from my answer above there are many valid options and it's hard for the compiler to make a more specific suggestion because the compiler can't know your intention.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Great! |
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 |
Uh oh!
There was an error while loading. Please reload this page.
The text was updated successfully, but these errors were encountered: