UHotelRoomCreateParams.fromMap constructor
UHotelRoomCreateParams.fromMap(
- Map<String, dynamic> json
)
Implementation
factory UHotelRoomCreateParams.fromMap(Map<String, dynamic> json) => UHotelRoomCreateParams(
detail1: json["detail1"],
detail2: json["detail2"],
tags: json["tags"] == null ? <int>[] : List<int>.from(json["tags"]!.map((dynamic x) => x)),
id: json["id"],
creatorId: json["creatorId"],
title: json["title"],
capacity: json["capacity"],
pricePerNight: json["pricePerNight"]?.toDouble(),
hotelId: json["hotelId"],
roomNumber: json["roomNumber"],
quantity: json["quantity"] == null ? 1 : (json["quantity"] as num).toInt(),
isAvailable: json["isAvailable"] == null || json["isAvailable"] as bool,
description: json["description"],
bedType: json["bedType"],
sizeSquareMeters: json["sizeSquareMeters"] == null ? null : (json["sizeSquareMeters"] as num).toDouble(),
floor: json["floor"] == null ? null : (json["floor"] as num).toInt(),
amenities: json["amenities"] == null ? null : List<String>.from(json["amenities"]!.map((dynamic x) => x)),
adminUserIds: json["adminUserIds"] == null ? <String>[] : List<String>.from(json["adminUserIds"]!.map((dynamic x) => x)),
);