toDocument method

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

Implementation

@override
Map<String, Object?> toDocument() {
  final Map<String, dynamic>? homePagesMap =
      homePages != null ? homePages!.toDocument() : null;

  Map<String, Object?> theDocument = HashMap();
  if (ownerID != null) {
    theDocument["ownerID"] = ownerID;
  } else {
    theDocument["ownerID"] = null;
  }
  if (title != null) {
    theDocument["title"] = title;
  } else {
    theDocument["title"] = null;
  }
  if (homeURL != null) {
    theDocument["homeURL"] = homeURL;
  } else {
    theDocument["homeURL"] = null;
  }
  if (email != null) {
    theDocument["email"] = email;
  } else {
    theDocument["email"] = null;
  }
  if (description != null) {
    theDocument["description"] = description;
  } else {
    theDocument["description"] = null;
  }
  if (appStatus != null) {
    theDocument["appStatus"] = appStatus;
  } else {
    theDocument["appStatus"] = null;
  }
  if (anonymousProfilePhotoId != null) {
    theDocument["anonymousProfilePhotoId"] = anonymousProfilePhotoId;
  } else {
    theDocument["anonymousProfilePhotoId"] = null;
  }
  if (homePages != null) {
    theDocument["homePages"] = homePagesMap;
  } else {
    theDocument["homePages"] = null;
  }
  if (logoId != null) {
    theDocument["logoId"] = logoId;
  } else {
    theDocument["logoId"] = null;
  }
  if (styleFamily != null) {
    theDocument["styleFamily"] = styleFamily;
  } else {
    theDocument["styleFamily"] = null;
  }
  if (styleName != null) {
    theDocument["styleName"] = styleName;
  } else {
    theDocument["styleName"] = null;
  }
  if (autoPrivileged1 != null) {
    theDocument["autoPrivileged1"] = autoPrivileged1;
  } else {
    theDocument["autoPrivileged1"] = null;
  }
  if (isFeatured != null) {
    theDocument["isFeatured"] = isFeatured;
  } else {
    theDocument["isFeatured"] = null;
  }
  if (includeShippingAddress != null) {
    theDocument["includeShippingAddress"] = includeShippingAddress;
  } else {
    theDocument["includeShippingAddress"] = null;
  }
  if (includeInvoiceAddress != null) {
    theDocument["includeInvoiceAddress"] = includeInvoiceAddress;
  } else {
    theDocument["includeInvoiceAddress"] = null;
  }
  if (includeSubscriptions != null) {
    theDocument["includeSubscriptions"] = includeSubscriptions;
  } else {
    theDocument["includeSubscriptions"] = null;
  }
  if (welcomeMessage != null) {
    theDocument["welcomeMessage"] = welcomeMessage;
  } else {
    theDocument["welcomeMessage"] = null;
  }
  return theDocument;
}