toDocument method

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

Implementation

@override
Map<String, Object?> toDocument() {
  Map<String, Object?> theDocument = HashMap();
  if (key != null) {
    theDocument["key"] = key;
  } else {
    theDocument["key"] = null;
  }
  if (value != null) {
    theDocument["value"] = value;
  } else {
    theDocument["value"] = null;
  }
  return theDocument;
}