toJson method

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

Implementation

@override
Map<String, Object?> toJson() => {
      if (kind != null) "kind": encodeValue(kind),
      if (width != null) "width": encodeValue(width),
      if (height != null) "height": encodeValue(height),
      if (durationMs != null) "duration_ms": encodeValue(durationMs),
      if (pageCount != null) "page_count": encodeValue(pageCount),
      if (frameCount != null) "frame_count": encodeValue(frameCount),
      if (colorSpace != null) "color_space": encodeValue(colorSpace),
      if (hasAlpha != null) "has_alpha": encodeValue(hasAlpha),
      if (codec != null) "codec": encodeValue(codec),
      if (aspectRatio != null) "aspect_ratio": encodeValue(aspectRatio),
    };