ChatItemRow.fromJson constructor

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

Implementation

factory ChatItemRow.fromJson(Map<String, dynamic> json,
    {ValueSerializer? serializer}) {
  serializer ??= driftRuntimeOptions.defaultSerializer;
  return ChatItemRow(
    id: serializer.fromJson<String>(json['id']),
    chatId: serializer.fromJson<String>(json['chatId']),
    authorId: serializer.fromJson<String>(json['authorId']),
    at: serializer.fromJson<PreciseDateTime>(json['at']),
    status: $ChatItemsTable.$converterstatus
        .fromJson(serializer.fromJson<int>(json['status'])),
    data: serializer.fromJson<String>(json['data']),
    cursor: serializer.fromJson<String?>(json['cursor']),
    ver: serializer.fromJson<String>(json['ver']),
  );
}