CustomerModel.fromMap constructor
CustomerModel.fromMap(
- Map<String, dynamic> json
)
Implementation
factory CustomerModel.fromMap(Map<String, dynamic> json) => CustomerModel(
id: json["id"],
email: json["email"],
phone: json["phone"],
status: json["status"],
role: json["role"],
groups: json["groups"] == null ? [] : List<dynamic>.from(json["groups"]!.map((x) => x)),
attributes: json["attributes"] == null ? null : Attributes.fromMap(json["attributes"]),
firstName: json["first_name"],
lastName: json["last_name"],
businessCode: json["business_code"],
emailVerified: json["email_verified"],
phoneVerified: json["phone_verified"],
createdAt: json["created_at"],
chatRoomId: json["chat_room_id"],
);