toDocument method

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

Implementation

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

  Map<String, Object?> theDocument = HashMap();
  if (appId != null) {
    theDocument["appId"] = appId;
  } else {
    theDocument["appId"] = null;
  }
  if (description != null) {
    theDocument["description"] = description;
  } else {
    theDocument["description"] = null;
  }
  if (decoratingComponentName != null) {
    theDocument["decoratingComponentName"] = decoratingComponentName;
  } else {
    theDocument["decoratingComponentName"] = null;
  }
  if (decoratingComponentId != null) {
    theDocument["decoratingComponentId"] = decoratingComponentId;
  } else {
    theDocument["decoratingComponentId"] = null;
  }
  if (contentComponentName != null) {
    theDocument["contentComponentName"] = contentComponentName;
  } else {
    theDocument["contentComponentName"] = null;
  }
  if (contentComponentId != null) {
    theDocument["contentComponentId"] = contentComponentId;
  } else {
    theDocument["contentComponentId"] = null;
  }
  if (decorationComponentPosition != null) {
    theDocument["decorationComponentPosition"] = decorationComponentPosition;
  } else {
    theDocument["decorationComponentPosition"] = null;
  }
  if (percentageDecorationVisible != null) {
    theDocument["percentageDecorationVisible"] = percentageDecorationVisible;
  } else {
    theDocument["percentageDecorationVisible"] = null;
  }
  if (conditions != null) {
    theDocument["conditions"] = conditionsMap;
  } else {
    theDocument["conditions"] = null;
  }
  return theDocument;
}