UParkingSubscriptionCreateParams.fromMap constructor

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

Implementation

factory UParkingSubscriptionCreateParams.fromMap(Map<String, dynamic> json) => UParkingSubscriptionCreateParams(
  parkingId: json["parkingId"],
  licencePlate: json["licencePlate"],
  vehicleType: json["vehicleType"] ?? TagVehicle.car,
  tags: json["tags"] == null ? <int>[] : List<int>.from(json["tags"]!.map((dynamic x) => x)),
  customerName: json["customerName"],
  customerPhoneNumber: json["customerPhoneNumber"],
  price: (json["price"] as num?)?.toDouble() ?? 0,
  startDate: json["startDate"] == null ? null : DateTime.parse(json["startDate"]),
  expiryDate: json["expiryDate"] == null ? null : DateTime.parse(json["expiryDate"]),
  dailyEntryLimit: json["dailyEntryLimit"] ?? 0,
  officeHoursOnly: json["officeHoursOnly"] ?? false,
  detail1: json["detail1"] ?? "",
  detail2: json["detail2"] ?? "",
  id: json["id"],
  creatorId: json["creatorId"],
  adminUserIds: json["adminUserIds"] == null ? null : List<String>.from(json["adminUserIds"]!.map((dynamic x) => x)),
);