// To parse this JSON data, do // // final userdetails = userdetailsFromJson(jsonString); import 'dart:convert'; Userdetails userdetailsFromJson(String str) => Userdetails.fromJson(json.decode(str)); String userdetailsToJson(Userdetails data) => json.encode(data.toJson()); class Userdetails { int id; String name; String email; DateTime emailVerifiedAt; String summarry; String addr; int licenseNo; String pSuffix; String speciality; String subSpeciality; int phoneNo; int rank; int score; dynamic createdAt; dynamic updatedAt; Userdetails({ required this.id, required this.name, required this.email, required this.emailVerifiedAt, required this.summarry, required this.addr, required this.licenseNo, required this.pSuffix, required this.speciality, required this.subSpeciality, required this.phoneNo, required this.rank, required this.score, required this.createdAt, required this.updatedAt, }); factory Userdetails.fromJson(Map json) => Userdetails( id: json["id"], name: json["name"], email: json["email"], emailVerifiedAt: DateTime.parse(json["email_verified_at"]), summarry: json["summarry"], addr: json["addr"], licenseNo: json["license_no"], pSuffix: json["p_suffix"], speciality: json["speciality"], subSpeciality: json["sub_speciality"], phoneNo: json["phone_no"], rank: json["rank"], score: json["score"], createdAt: json["created_at"], updatedAt: json["updated_at"], ); Map toJson() => { "id": id, "name": name, "email": email, "email_verified_at": emailVerifiedAt.toIso8601String(), "summarry": summarry, "addr": addr, "license_no": licenseNo, "p_suffix": pSuffix, "speciality": speciality, "sub_speciality": subSpeciality, "phone_no": phoneNo, "rank": rank, "score": score, "created_at": createdAt, "updated_at": updatedAt, }; }