toJson method

Map<String, dynamic> toJson()

Produces a Map that can be serialized to JSON.

Implementation

Map<String, dynamic> toJson() {
  return <String, dynamic>{
    if (name != null) 'name': name,
    if (id != null) 'id': id,
    if (vendorId != null) 'vendor_id': vendorId,
    if (vendorName != null) 'vendor_name': vendorName,
    if (memorySize != null) 'memory_size': memorySize,
    if (apiType != null) 'api_type': apiType,
    if (multiThreadedRendering != null)
      'multi_threaded_rendering': multiThreadedRendering,
    if (version != null) 'version': version,
    if (npotSupport != null) 'npot_support': npotSupport,
    if (graphicsShaderLevel != null)
      'graphics_shader_level': graphicsShaderLevel,
    if (maxTextureSize != null) 'max_texture_size': maxTextureSize,
    if (supportsComputeShaders != null)
      'supports_compute_shaders': supportsComputeShaders,
    if (supportsDrawCallInstancing != null)
      'supports_draw_call_instancing': supportsDrawCallInstancing,
    if (supportsGeometryShaders != null)
      'supports_geometry_shaders': supportsGeometryShaders,
    if (supportsRayTracing != null)
      'supports_ray_tracing': supportsRayTracing,
  };
}