-
Notifications
You must be signed in to change notification settings - Fork 146
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
Non-nullable instance field '_bmi' must be initialized. #17
Comments
Same here tried every trick in the dictionary didn't worked! |
@deepraj02 |
Thank you soo much brother, however I tried this method too but at that time my app crashed |
in Calculatorbrain class make sure that in calculateBMI function, bmi was aslo initialised as _bmi |
this issue has come up with latest updates in Dart. |
@hacker0id can you post the error |
even when I set the property to late it still shows late initialisation error and the only solution I came around was to initialise the variable |
The reason of this error that when you use a late variable before its initialization. |
if you have this issue, mark the variable _bmi with late key word.
late double _bmi;
The text was updated successfully, but these errors were encountered: