toDocument method

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

Implementation

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

  Map<String, Object?> theDocument = HashMap();
  if (color != null) {
    theDocument["color"] = colorMap;
  } else {
    theDocument["color"] = null;
  }
  if (offsetDX != null) {
    theDocument["offsetDX"] = offsetDX;
  } else {
    theDocument["offsetDX"] = null;
  }
  if (offsetDY != null) {
    theDocument["offsetDY"] = offsetDY;
  } else {
    theDocument["offsetDY"] = null;
  }
  if (spreadRadius != null) {
    theDocument["spreadRadius"] = spreadRadius;
  } else {
    theDocument["spreadRadius"] = null;
  }
  if (blurRadius != null) {
    theDocument["blurRadius"] = blurRadius;
  } else {
    theDocument["blurRadius"] = null;
  }
  return theDocument;
}