UParkingSubscriptionReadParams.fromMap constructor

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

Implementation

factory UParkingSubscriptionReadParams.fromMap(Map<String, dynamic> json) => UParkingSubscriptionReadParams(
  parkingId: json["parkingId"],
  licencePlate: json["licencePlate"],
  query: json["query"],
  isActive: json["isActive"],
  isExpiringSoon: json["isExpiringSoon"],
  isExpired: json["isExpired"],
  expiringInDays: json["expiringInDays"] ?? 7,
  pageSize: json["pageSize"],
  pageNumber: json["pageNumber"],
  tags: json["tags"] == null ? null : List<int>.from(json["tags"]!.map((dynamic x) => x)),
  selectorArgs: json["selectorArgs"] == null ? null : UParkingSubscriptionSelectorArgs.fromMap(json["selectorArgs"]),
  fromCreatedAt: json["fromCreatedAt"] == null ? null : DateTime.parse(json["fromCreatedAt"]),
  toCreatedAt: json["toCreatedAt"] == null ? null : DateTime.parse(json["toCreatedAt"]),
  ids: json["ids"] == null ? null : List<String>.from(json["ids"]!.map((dynamic x) => x)),
  creatorId: json["creatorId"],
  orderBy: TagOrderBy.values.firstWhereOrNull((TagOrderBy e) => e.number == json["orderBy"]) ?? TagOrderBy.createdAt,
);