I'm new to Flutter development and here in my code why i'm getting this error (Non-nullable instance field taskTitle
must be initialized), despite of initialising instance field in constructor.
So, I'm assuming that whenever this class instance is created user need to provide both member mendatory, so this error should not occur (although if add late modifier this error disappear).
Please clear my doubts.
class Task {
String taskTitle;
bool isDone = false;
Task(String taskTitle, bool isDone) {
this.taskTitle = taskTitle;
this.isDone = isDone;
}
}