UUserReadParams.fromMap constructor

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

Implementation

factory UUserReadParams.fromMap(Map<String, dynamic> json) => UUserReadParams(
      userName: json["userName"],
      phoneNumber: json["phoneNumber"],
      email: json["email"],
      bio: json["bio"],
      startBirthDate: json["startBirthDate"] == null ? null : DateTime.parse(json["startBirthDate"]),
      endBirthDate: json["endBirthDate"] == null ? null : DateTime.parse(json["endBirthDate"]),
      categories: json["categories"] == null ? null : List<String>.from(json["categories"].map((dynamic x) => x)),
      showCategories: json["showCategories"] ?? false,
      showMedia: json["showMedia"] ?? false,
      orderByLastName: json["orderByLastName"] ?? false,
      orderByLastNameDesc: json["orderByLastNameDesc"] ?? false,
      pageSize: json["pageSize"] ?? 0,
      pageNumber: json["pageNumber"] ?? 0,
      fromCreatedAt: json["fromCreatedAt"] == null ? null : DateTime.parse(json["fromCreatedAt"]),
      toCreatedAt: json["toCreatedAt"] == null ? null : DateTime.parse(json["toCreatedAt"]),
      orderByCreatedAt: json["orderByCreatedAt"] ?? false,
      orderByCreatedAtDesc: json["orderByCreatedAtDesc"] ?? false,
      orderByUpdatedAt: json["orderByUpdatedAt"] ?? false,
      orderByUpdatedAtDesc: json["orderByUpdatedAtDesc"] ?? false,
      tags: json["tags"] == null ? null : List<int>.from(json["tags"].map((dynamic x) => x)),
    );