UContentReadParams.fromMap constructor
UContentReadParams.fromMap(
- Map<String, dynamic> json
)
Implementation
factory UContentReadParams.fromMap(Map<String, dynamic> json) => UContentReadParams(
showMedia: json["showMedia"] ?? false,
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,
tags: json["tags"] == null ? null : List<int>.from(json["tags"].map((dynamic x) => x)),
);