fromMap static method

RoomEntity? fromMap(
  1. Object? o, {
  2. Map<String, String>? newDocumentIds,
})

Implementation

static RoomEntity? fromMap(Object? o, {Map<String, String>? newDocumentIds}) {
  if (o == null) return null;
  var map = o as Map<String, dynamic>;

  return RoomEntity(
    ownerId: map['ownerId'],
    appId: map['appId'],
    description: map['description'],
    isRoom: map['isRoom'],
    members: map['members'] == null ? null : List.from(map['members']),
    timestamp: map['timestamp'] == null
        ? null
        : (map['timestamp'] as Timestamp).millisecondsSinceEpoch,
  );
}