Issue
help me, I’m still stuck here for the past few days. why is it like this? error indicates there is an error in "dashboard_bottom_nav"
and when I try to click the error it directs me to this class and directs it to SafeArea
I really need your help
Solution
Try with the following code may be it will help you because your error is clear it saying null check should be apply on nullable object.
// you can apply null handling on that line where it showing error
var title = text;
if (title != null) {
var len = title.length; // Safe
}
//or use default null safety operator
Use ?. and ??
var len = title?.length ?? 0; // Provide a default value if title is null.
Answered By – Dharmender Manral
Answer Checked By – Willingham (FlutterFixes Volunteer)