I have a model class that is a combination of two classes.
class UserItem{
Item item;
User user;
UserItem(Item item, User user){
this.item = item;
this.user = user;
}
}
I am basically trying to create a variables that are an instances of other classes. Dart is complaining and says I have to either instantiate or declare the item variable as late. I declared it as late and it is okay now. But is this the right way to proceed?