UserContext.fromJson constructor

UserContext.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory UserContext.fromJson(Map<String, dynamic> json) =>
    UserContext(
      pancard: json["pancard"],
      fullName: json["fullName"],
      gender: json["gender"],
      email: json["email"],
      dob: json["dob"] == null || (json["dob"]
          ?.toString()
          .isEmpty ?? true)
          ? null
          : DateTime.parse(json["dob"]),
      address:
      json["address"] == null ? null : Address.fromJson(json["address"]),
    );