I have a model with quite a bit of parameters:
UserDataModel({
this.id,
this.name,
this.email,
this.phone,
this.photo,
this.firstName,
this.lastName,
this.birthday,
this.sex,
this.land,
this.bio,
this.interests,
this.facebook,
this.instagram,
this.telegram,
this.register,
this.login,
this.timezone,
this.banned,
this.bannedDate,
this.locked,
this.lockedDate,
this.postsNum,
this.likesNum,
this.commentsNum,
this.views,
this.notifications,
this.push,
this.position,
this.rating,
this.rewards,
this.verified,
this.notify,
this.the2Fa,
this.params,
});
and I'm using a stream to pass this model to a widget that only needs rating.level(a submodel for the rating parameter) and photo.small(another submodel, but for the photo parameter).
And I'm wondering if passing the entire model to a widget that only requires 2 parameters can lead to more memory being used, for example. It's not a big deal to do it either way, and it would be a bit upsetting to leave some minor optimisation on the table.
Any help is appreciated. I guess this question can apply to any language, but since I'm using flutter, I'll tag it with that.