You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i'm using a new version of flutter
i get this error: type 'Null' is not a subtype of type 'String'
at the 3rd this line of the code (plan_services.dart):
Plan createPlan(String name) {
final model = _repository.create();
print('my name $name'); //the name in not null here
final plan = Plan.fromModel(model)..name = name; //error here
savePlan(plan);
return plan;
}
after debugging, i got name=null here (plan.dart)
Plan.fromModel(Model model)
: id = model.id,
name = model.data['name'], //the name is null here
tasks = model.data['task']
?.map<Task>((task) => Task.fromModel(task))
?.toList() ??
<Task>[];
can you explain why? thank you
The text was updated successfully, but these errors were encountered:
Hey @amkfat can you please also provide the chapter and page number of the exercise you are following? We will try to reach out to author and provide you with an explanation and resolution for your queries.
i'm using a new version of flutter
i get this error:
type 'Null' is not a subtype of type 'String'
at the 3rd this line of the code (plan_services.dart):
after debugging, i got name=null here (plan.dart)
can you explain why? thank you
The text was updated successfully, but these errors were encountered: