Getting this null check error, despite having null safety through out the code.
I’m attaching a git repo
https://github.com/HidayatBukhari01/Notes-App.git
can someone please check this code and explain why am i having this errorenter image description here
On clicking + icon data should have been inserted into notes table, instead it’s throwing null safety error!.
2
Answers
You need to check, if the value becomes null, if it does, the above error is evident. Else, you need to put the "?" operator, before the variable or function where the above error occurs, as –
Even I am new to Flutter. if you get this error resolved, great, else check out on other’s answers
I went through your code and here is the mistake you done
Here you said that said that dbHelper is not null but the value its getting is null and before calling this check its value in console first,
and use it like this only