VersionRow.fromJson constructor

VersionRow.fromJson(
  1. Map<String, dynamic> json, {
  2. ValueSerializer? serializer,
})

Implementation

factory VersionRow.fromJson(Map<String, dynamic> json,
    {ValueSerializer? serializer}) {
  serializer ??= driftRuntimeOptions.defaultSerializer;
  return VersionRow(
    userId: serializer.fromJson<String>(json['userId']),
    favoriteChatsListVersion:
        serializer.fromJson<String?>(json['favoriteChatsListVersion']),
    favoriteChatsSynchronized:
        serializer.fromJson<bool?>(json['favoriteChatsSynchronized']),
    chatContactsListVersion:
        serializer.fromJson<String?>(json['chatContactsListVersion']),
    favoriteContactsSynchronized:
        serializer.fromJson<bool?>(json['favoriteContactsSynchronized']),
    contactsSynchronized:
        serializer.fromJson<bool?>(json['contactsSynchronized']),
    blocklistSynchronized:
        serializer.fromJson<bool?>(json['blocklistSynchronized']),
    sessionsListVersion:
        serializer.fromJson<String?>(json['sessionsListVersion']),
    blocklistVersion: serializer.fromJson<String?>(json['blocklistVersion']),
    blocklistCount: serializer.fromJson<int?>(json['blocklistCount']),
  );
}