toJson static method

Map<String, dynamic>? toJson(
  1. TextShadowConfiguration? textShadow
)

Implementation

static Map<String, dynamic>? toJson(TextShadowConfiguration? textShadow) {
  if (textShadow == null) return null;

  Map<String, dynamic> json = {};

  if (textShadow.opacity != null) {
    json["opacity"] = textShadow.opacity!;
  }

  if (textShadow.color != null) {
    json["color"] = textShadow.color!;
  }

  if (textShadow.offsetX != null) {
    json["offsetX"] = textShadow.offsetX!;
  }

  if (textShadow.offsetY != null) {
    json["offsetY"] = textShadow.offsetY!;
  }

  if (textShadow.radius != null) {
    json["radius"] = textShadow.radius!;
  }

  return json;
}