UDormBedContractReadParams.fromMap constructor
UDormBedContractReadParams.fromMap(
- Map<String, dynamic> json
)
Implementation
factory UDormBedContractReadParams.fromMap(Map<String, dynamic> json) => UDormBedContractReadParams(
pageSize: json["pageSize"],
pageNumber: json["pageNumber"],
fromCreatedAt: json["fromCreatedAt"] == null ? null : DateTime.parse(json["fromCreatedAt"]),
toCreatedAt: json["toCreatedAt"] == null ? null : DateTime.parse(json["toCreatedAt"]),
tags: json["tags"] == null ? <int>[] : List<int>.from(json["tags"]!.map((dynamic x) => x)),
ids: json["ids"] == null ? <String>[] : List<String>.from(json["ids"]!.map((dynamic x) => x)),
userId: json["userId"],
bedId: json["bedId"],
dormId: json["dormId"],
creatorId: json["creatorId"],
userName: json["userName"],
startDate: json["startDate"] == null ? null : DateTime.parse(json["startDate"]),
endDate: json["endDate"] == null ? null : DateTime.parse(json["endDate"]),
activeOnly: json["activeOnly"],
upcomingOnly: json["upcomingOnly"],
expiredOnly: json["expiredOnly"],
expiringWithinDays: json["expiringWithinDays"] == null ? null : (json["expiringWithinDays"] as num).toInt(),
selectorArgs: json["selectorArgs"] == null ? null : ContractSelectorArgs.fromMap(json["selectorArgs"]),
orderBy: json["orderBy"],
);