toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var background = this.background;
  var backgroundAttachment = this.backgroundAttachment;
  var backgroundBlendMode = this.backgroundBlendMode;
  var backgroundClip = this.backgroundClip;
  var backgroundColor = this.backgroundColor;
  var backgroundImage = this.backgroundImage;
  var backgroundOrigin = this.backgroundOrigin;
  var backgroundPosition = this.backgroundPosition;
  var backgroundRepeat = this.backgroundRepeat;
  var backgroundSize = this.backgroundSize;
  var layer = this.layer;
  var gutterTop = this.gutterTop;
  var gutterRight = this.gutterRight;
  var gutterBottom = this.gutterBottom;
  var gutterLeft = this.gutterLeft;

  final json = <String, Object?>{};
  json[r'background'] = background;
  if (backgroundAttachment != null) {
    json[r'backgroundAttachment'] = backgroundAttachment;
  }
  if (backgroundBlendMode != null) {
    json[r'backgroundBlendMode'] = backgroundBlendMode;
  }
  if (backgroundClip != null) {
    json[r'backgroundClip'] = backgroundClip;
  }
  if (backgroundColor != null) {
    json[r'backgroundColor'] = backgroundColor;
  }
  if (backgroundImage != null) {
    json[r'backgroundImage'] = backgroundImage;
  }
  if (backgroundOrigin != null) {
    json[r'backgroundOrigin'] = backgroundOrigin;
  }
  if (backgroundPosition != null) {
    json[r'backgroundPosition'] = backgroundPosition;
  }
  if (backgroundRepeat != null) {
    json[r'backgroundRepeat'] = backgroundRepeat;
  }
  if (backgroundSize != null) {
    json[r'backgroundSize'] = backgroundSize;
  }
  if (layer != null) {
    json[r'layer'] = layer.toJson();
  }
  if (gutterTop != null) {
    json[r'gutterTop'] = gutterTop;
  }
  if (gutterRight != null) {
    json[r'gutterRight'] = gutterRight;
  }
  if (gutterBottom != null) {
    json[r'gutterBottom'] = gutterBottom;
  }
  if (gutterLeft != null) {
    json[r'gutterLeft'] = gutterLeft;
  }
  return json;
}