ChatMemberRow.fromJson constructor

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

Implementation

factory ChatMemberRow.fromJson(Map<String, dynamic> json,
    {ValueSerializer? serializer}) {
  serializer ??= driftRuntimeOptions.defaultSerializer;
  return ChatMemberRow(
    userId: serializer.fromJson<String>(json['userId']),
    chatId: serializer.fromJson<String>(json['chatId']),
    joinedAt: serializer.fromJson<PreciseDateTime>(json['joinedAt']),
    cursor: serializer.fromJson<String?>(json['cursor']),
  );
}