ChatRow.fromJson constructor
Implementation
factory ChatRow.fromJson(Map<String, dynamic> json,
{ValueSerializer? serializer}) {
serializer ??= driftRuntimeOptions.defaultSerializer;
return ChatRow(
id: serializer.fromJson<String>(json['id']),
avatar: serializer.fromJson<String?>(json['avatar']),
name: serializer.fromJson<String?>(json['name']),
members: serializer.fromJson<String>(json['members']),
kindIndex: serializer.fromJson<int>(json['kindIndex']),
isHidden: serializer.fromJson<bool>(json['isHidden']),
muted: serializer.fromJson<String?>(json['muted']),
directLink: serializer.fromJson<String?>(json['directLink']),
createdAt: serializer.fromJson<PreciseDateTime>(json['createdAt']),
updatedAt: serializer.fromJson<PreciseDateTime>(json['updatedAt']),
lastReads: serializer.fromJson<String>(json['lastReads']),
lastDelivery: serializer.fromJson<PreciseDateTime?>(json['lastDelivery']),
firstItem: serializer.fromJson<String?>(json['firstItem']),
lastItem: serializer.fromJson<String?>(json['lastItem']),
lastReadItem: serializer.fromJson<String?>(json['lastReadItem']),
unreadCount: serializer.fromJson<int>(json['unreadCount']),
totalCount: serializer.fromJson<int>(json['totalCount']),
ongoingCall: serializer.fromJson<String?>(json['ongoingCall']),
favoritePosition: serializer.fromJson<double?>(json['favoritePosition']),
membersCount: serializer.fromJson<int>(json['membersCount']),
ver: serializer.fromJson<String>(json['ver']),
lastItemCursor: serializer.fromJson<String?>(json['lastItemCursor']),
lastReadItemCursor:
serializer.fromJson<String?>(json['lastReadItemCursor']),
recentCursor: serializer.fromJson<String?>(json['recentCursor']),
favoriteCursor: serializer.fromJson<String?>(json['favoriteCursor']),
);
}