toModel method
Implementation
User toModel() => User(
id,
this.num,
name: name,
bio: bio,
avatar: avatar?.toModel(),
callCover: callCover?.toModel(),
online: online?.$$typename == 'UserOnline',
lastSeenAt:
online?.$$typename == 'UserOffline'
? (online as UserMixin$Online$UserOffline).lastSeenAt
: null,
dialog: dialog?.id,
presenceIndex: presence?.index,
status: status,
isDeleted: isDeleted,
isBlocked: isBlocked.record?.toModel(id),
welcomeMessage: welcomeMessage?.toModel(),
);