toDocument method

  1. @override
Map<String, Object?> toDocument()
override

Implementation

@override
Map<String, Object?> toDocument() {
  Map<String, Object?> theDocument = HashMap();
  if (ownerId != null) {
    theDocument["ownerId"] = ownerId;
  } else {
    theDocument["ownerId"] = null;
  }
  if (appId != null) {
    theDocument["appId"] = appId;
  } else {
    theDocument["appId"] = null;
  }
  if (description != null) {
    theDocument["description"] = description;
  } else {
    theDocument["description"] = null;
  }
  if (isRoom != null) {
    theDocument["isRoom"] = isRoom;
  } else {
    theDocument["isRoom"] = null;
  }
  if (members != null) {
    theDocument["members"] = members!.toList();
  } else {
    theDocument["members"] = null;
  }
  theDocument["timestamp"] = timestamp;
  return theDocument;
}