这是indexloc提供的服务,不要输入任何密码
Skip to content

The ProductMedia model is missing fields such as links to videos, and now has only the preview field #131

@WangXiaoRi

Description

@WangXiaoRi

/// The product media constructor
factory ProductMedia({
required String id,
required String mediaContentType,
ShopifyImage? image,
String? alt,
}) = _ProductVariant;

/// The product media from graphjson
factory ProductMedia.fromGraphJson(Map<String, dynamic> json) {
Map<String, dynamic> nodeJson = json['node'] ?? const {};
return ProductMedia(
id: nodeJson['id'],
mediaContentType: nodeJson['mediaContentType'],
alt: nodeJson['alt'],
image: nodeJson['previewImage'] != null
? ShopifyImage.fromJson(nodeJson['previewImage'])
: null,
);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions