UHotelRoomReadParams.fromMap constructor

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

Implementation

factory UHotelRoomReadParams.fromMap(Map<String, dynamic> json) => UHotelRoomReadParams(
  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)),
  creatorId: json["creatorId"],
  title: json["title"],
  hotelId: json["hotelId"],
  minPrice: json["minPrice"]?.toDouble(),
  maxPrice: json["maxPrice"]?.toDouble(),
  availableOnly: json["availableOnly"],
  selectorArgs: json["selectorArgs"] == null ? null : HotelRoomSelectorArgs.fromMap(json["selectorArgs"]),
  orderBy: json["orderBy"],
  minCapacity: json["minCapacity"],
  maxCapacity: json["maxCapacity"],
);