UProductCreateParams.fromMap constructor

UProductCreateParams.fromMap(
  1. Map<String, dynamic> json
)

Implementation

factory UProductCreateParams.fromMap(Map<String, dynamic> json) => UProductCreateParams(
  title: json["title"],
  code: json["code"],
  subtitle: json["subtitle"],
  description: json["description"],
  actionType: json["actionType"],
  actionTitle: json["actionTitle"],
  actionUri: json["actionUri"],
  slug: json["slug"],
  type: json["type"],
  content: json["content"],
  latitude: json["latitude"],
  longitude: json["longitude"],
  stock: json["stock"],
  details: json["details"],
  point: json["point"],
  tags: List<int>.from(json["tags"].map((dynamic x) => x)),
  categories: json["categories"] == null ? null : List<String>.from(json["categories"].map((dynamic x) => x)),
  relatedProducts: json["relatedProducts"] == null ? null : List<String>.from(json["relatedProducts"].map((dynamic x) => x)),
  parentId: json["parentId"],
  creatorId: json["creatorId"],
  phoneNumber: json["phoneNumber"],
  address: json["address"],
  detail1: json["detail1"],
  detail2: json["detail2"],
  id: json["id"],
  adminUserIds: json["adminUserIds"] == null ? <String>[] : List<String>.from(json["adminUserIds"]!.map((dynamic x) => x)),
  order: json["order"],
  children: json["children"] == null ? <UProductCreateParams>[] : List<UProductCreateParams>.from(json["children"]!.map((dynamic x) => UProductCreateParams.fromMap(x))),
  media: json["media"] == null ? <String>[] : List<String>.from(json["media"]!.map((dynamic x) => x)),
);