copyWith method

User copyWith({
  1. int? id,
  2. String? fullName,
  3. String? userName,
  4. String? avatar,
  5. String? bio,
})

Implementation

User copyWith({
  int? id,
  String? fullName,
  String? userName,
  String? avatar,
  String? bio,
}) {
  return User(
    id: id ?? this.id,
    fullName: fullName ?? this.fullName,
    userName: userName ?? this.userName,
    avatar: avatar ?? this.avatar,
    bio: bio ?? this.bio,
  );
}