toDb method
Implementation
UserRow toDb() {
return UserRow(
id: value.id.val,
num: value.num.val,
name: value.name?.val,
bio: value.bio?.val,
avatar: value.avatar == null ? null : jsonEncode(value.avatar?.toJson()),
callCover:
value.callCover == null
? null
: jsonEncode(value.callCover?.toJson()),
mutualContactsCount: value.mutualContactsCount,
online: value.online,
presenceIndex: value.presenceIndex,
status: value.status?.val,
isDeleted: value.isDeleted,
dialog: value.dialog.val,
isBlocked:
value.isBlocked == null
? null
: jsonEncode(value.isBlocked?.toJson()),
lastSeenAt: value.lastSeenAt,
contacts: jsonEncode(value.contacts.map((e) => e.toJson()).toList()),
ver: ver.val,
blockedVer: blockedVer.val,
welcomeMessage:
value.welcomeMessage == null
? null
: jsonEncode(value.welcomeMessage?.toJson()),
);
}