toDocument method

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

Implementation

@override
Map<String, Object?> toDocument() {
  Map<String, Object?> theDocument = HashMap();
  if (description != null) {
    theDocument["description"] = description;
  } else {
    theDocument["description"] = null;
  }
  if (appId != null) {
    theDocument["appId"] = appId;
  } else {
    theDocument["appId"] = null;
  }
  if (authorId != null) {
    theDocument["authorId"] = authorId;
  } else {
    theDocument["authorId"] = null;
  }
  if (name != null) {
    theDocument["name"] = name;
  } else {
    theDocument["name"] = null;
  }
  if (sendTo != null) {
    theDocument["sendTo"] = sendTo;
  } else {
    theDocument["sendTo"] = null;
  }
  theDocument['collections'] = collections;

  if (processed != null) {
    theDocument["processed"] = processed;
  } else {
    theDocument["processed"] = null;
  }
  if (requestType != null) {
    theDocument["requestType"] = requestType;
  } else {
    theDocument["requestType"] = null;
  }
  return theDocument;
}