RoomMembership.fromJson constructor

RoomMembership.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory RoomMembership.fromJson(Map<String, dynamic> json) {
  return RoomMembership(
    invitedBy: json['InvitedBy'] as String?,
    member: json['Member'] != null
        ? Member.fromJson(json['Member'] as Map<String, dynamic>)
        : null,
    role: (json['Role'] as String?)?.toRoomMembershipRole(),
    roomId: json['RoomId'] as String?,
    updatedTimestamp: timeStampFromJson(json['UpdatedTimestamp']),
  );
}