UProductReadParams.fromMap constructor

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

Implementation

factory UProductReadParams.fromMap(Map<String, dynamic> json) => UProductReadParams(
      query: json["query"],
      title: json["title"],
      code: json["code"],
      parentId: json["parentId"],
      userId: json["userId"],
      minStock: json["minStock"],
      maxStock: json["maxStock"],
      minPrice: json["minPrice"],
      maxPrice: json["maxPrice"],
      showCategories: json["showCategories"] ?? false,
      showCategoriesMedia: json["showCategoriesMedia"] ?? false,
      showMedia: json["showMedia"] ?? false,
      showUser: json["showUser"] ?? false,
      showUserMedia: json["showUserMedia"] ?? false,
      showUserCategory: json["showUserCategory"] ?? false,
      showChildren: json["showChildren"] ?? false,
      showChildrenDepth: json["showChildrenDepth"] ?? false,
      ids: json["ids"] == null ? null : List<String>.from(json["ids"].map((dynamic x) => x)),
      pageSize: json["pageSize"] ?? 0,
      pageNumber: json["pageNumber"] ?? 0,
      fromCreatedAt: json["fromCreatedAt"] == null ? null : DateTime.parse(json["fromCreatedAt"]),
      toCreatedAt: json["toCreatedAt"] == null ? null : DateTime.parse(json["toCreatedAt"]),
      orderByCreatedAt: json["orderByCreatedAt"] ?? false,
      orderByCreatedAtDesc: json["orderByCreatedAtDesc"] ?? false,
      orderByUpdatedAt: json["orderByUpdatedAt"] ?? false,
      orderByUpdatedAtDesc: json["orderByUpdatedAtDesc"] ?? false,
      showCommentCount: json["showCommentCount"] ?? false,
      showIsFollowing: json["showIsFollowing"] ?? false,
      showChildrenCount: json["showChildrenCount"] ?? false,
      tags: json["tags"] == null ? null : List<int>.from(json["tags"].map((dynamic x) => x)),
    );