RoomMetadata.fromJson constructor

RoomMetadata.fromJson(
  1. Map<String, dynamic> dataMap
)

Creates a RoomMetadata object from the JSON response to a GET request.

Implementation

factory RoomMetadata.fromJson(Map<String, dynamic> dataMap) {
  return RoomMetadata(
    name: dataMap[ApiFields.name] ?? "",
    archetype: RoomArchetype.fromString(dataMap[ApiFields.archetype] ?? ""),
  );
}