connect with backend
This commit is contained in:
46
lib/models/user_profile.dart
Normal file
46
lib/models/user_profile.dart
Normal file
@@ -0,0 +1,46 @@
|
||||
class UserProfile {
|
||||
final String customerId;
|
||||
final String customerName;
|
||||
final String companyName;
|
||||
final String? designation;
|
||||
final String email;
|
||||
final String mobile;
|
||||
final String? address;
|
||||
final String? pincode;
|
||||
final String? status;
|
||||
final String? customerType;
|
||||
final String? profileImage;
|
||||
final String? date;
|
||||
|
||||
UserProfile({
|
||||
required this.customerId,
|
||||
required this.customerName,
|
||||
required this.companyName,
|
||||
this.designation,
|
||||
required this.email,
|
||||
required this.mobile,
|
||||
this.address,
|
||||
this.pincode,
|
||||
this.status,
|
||||
this.customerType,
|
||||
this.profileImage,
|
||||
required this.date,
|
||||
});
|
||||
|
||||
factory UserProfile.fromJson(Map<String, dynamic> json) {
|
||||
return UserProfile(
|
||||
customerId: json['customer_id'],
|
||||
customerName: json['customer_name'],
|
||||
companyName: json['company_name'],
|
||||
designation: json['designation'],
|
||||
email: json['email'],
|
||||
mobile: json['mobile'],
|
||||
address: json['address'],
|
||||
pincode: json['pincode'],
|
||||
status: json['status'],
|
||||
customerType: json['customer_type'],
|
||||
profileImage: json['profile_image'],
|
||||
date: json['date'], // nullable ok now
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user