UUserResponse.fromMap constructor

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

Implementation

factory UUserResponse.fromMap(Map<String, dynamic> json) => UUserResponse(
  id: json["id"],
  createdAt: DateTime.parse(json["createdAt"]),
  jsonData: UUserJson.fromMap(json["jsonData"]),
  tags: List<int>.from(json["tags"].map((dynamic x) => x)),
  userName: json["userName"],
  landLine: json["landLine"],
  phoneNumber: json["phoneNumber"],
  email: json["email"],
  firstName: json["firstName"],
  lastName: json["lastName"],
  nationalCode: json["nationalCode"],
  bio: json["bio"],
  nationalCardFront: json["nationalCardFront"],
  nationalCardBack: json["nationalCardBack"],
  birthCertificateFirst: json["birthCertificateFirst"],
  birthCertificateSecond: json["birthCertificateSecond"],
  birthCertificateThird: json["birthCertificateThird"],
  birthCertificateForth: json["birthCertificateForth"],
  birthCertificateFifth: json["birthCertificateFifth"],
  visualAuthentication: json["visualAuthentication"],
  eSignature: json["eSignature"],
  birthdate: json["birthdate"] == null ? null : DateTime.parse(json["birthdate"]),
  categories: json["categories"] == null ? <UCategoryResponse>[] : List<UCategoryResponse>.from(json["categories"].map((dynamic x) => UCategoryResponse.fromMap(x))),
  media: json["media"] == null ? <UMediaResponse>[] : List<UMediaResponse>.from(json["media"].map((dynamic x) => UMediaResponse.fromMap(x))),
  addresses: json["addresses"] == null ? <UAddressResponse>[] : List<UAddressResponse>.from(json["addresses"].map((dynamic x) => UAddressResponse.fromMap(x))),
  merchants: json["merchants"] == null ? <UMerchantResponse>[] : List<UMerchantResponse>.from(json["merchants"].map((dynamic x) => UMerchantResponse.fromMap(x))),
  wallets: json["wallets"] == null ? <UWalletResponse>[] : List<UWalletResponse>.from(json["wallets"].map((dynamic x) => UWalletResponse.fromMap(x))),
  txns: json["txns"] == null ? <UTxnResponse>[] : List<UTxnResponse>.from(json["txns"].map((dynamic x) => UTxnResponse.fromMap(x))),
  bankAccounts: json["bankAccounts"] == null ? <UBankAccountResponse>[] : List<UBankAccountResponse>.from(json["bankAccounts"].map((dynamic x) => UBankAccountResponse.fromMap(x))),
  simCards: json["simCards"] == null ? <USimCardResponse>[] : List<USimCardResponse>.from(json["simCards"].map((dynamic x) => USimCardResponse.fromMap(x))),
  creator: json["creator"] == null ? null : UUserResponse.fromMap(json["creator"]),
  creatorId: json["creatorId"],
  adminUserIds: json["adminUserIds"] == null ? <String>[] : List<String>.from(json["adminUserIds"]!.map((dynamic x) => x)),
);