copyWith method
Builds a copy of a User
id
: The id of the userpicture
: A link to the user picturememberSince
: The user join datefollowing
: The number of users this user is followingfollowers
: The number of followers this user hasabout
: More about the user
Implementation
User copyWith(
{String? id,
String? picture,
DateTime? memberSince,
int? following,
int? followers,
String? about}) {
return User(
id: id ?? this.id,
picture: picture ?? this.picture,
memberSince: memberSince ?? this.memberSince,
following: following ?? this.following,
followers: followers ?? this.followers,
about: about ?? this.about);
}