toPublic method
Returns an object with only the information that can safely be shared publicly for the user.
Implementation
UserInfoPublic toPublic({
bool includeUserId = true,
bool includeFullName = true,
}) {
return UserInfoPublic(
id: includeUserId ? id : null,
userName: userName,
fullName: includeFullName ? fullName : null,
created: created,
imageUrl: imageUrl,
);
}