Update ProfileData model to include companies and enhance profile UI
- Added a new field for companies in the ProfileData model to store associated company information. - Updated JSON serialization methods to handle the new companies field. - Modified profile page views to display the user's full name and company name, replacing previous role and department fields for improved clarity. - Introduced new string constants for full name and phone in ProfileStrings.
This commit is contained in:
@@ -16,6 +16,10 @@ _ProfileData _$ProfileDataFromJson(Map<String, dynamic> json) => _ProfileData(
|
||||
department: json['department'] as String?,
|
||||
position: json['position'] as String?,
|
||||
phone: json['phone'] as String?,
|
||||
companies:
|
||||
(json['companies'] as List<dynamic>?)
|
||||
?.map((e) => CompanyProfileData.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
profileImage: json['profile_image'] as String?,
|
||||
isVerified: json['is_verified'] as bool?,
|
||||
lastLoginAt: (json['last_login_at'] as num?)?.toInt(),
|
||||
@@ -34,6 +38,7 @@ Map<String, dynamic> _$ProfileDataToJson(_ProfileData instance) =>
|
||||
'department': instance.department,
|
||||
'position': instance.position,
|
||||
'phone': instance.phone,
|
||||
'companies': instance.companies,
|
||||
'profile_image': instance.profileImage,
|
||||
'is_verified': instance.isVerified,
|
||||
'last_login_at': instance.lastLoginAt,
|
||||
|
||||
Reference in New Issue
Block a user