toSetUserInfoParam method
Implementation
Map<String, dynamic> toSetUserInfoParam() {
final Map<String, dynamic> data = <String, dynamic>{};
if (nickName != null) {
data['user_profile_item_nick_name'] = nickName;
}
if (gender != null) {
data['user_profile_item_gender'] = gender;
}
if (faceUrl != null) {
data['user_profile_item_face_url'] = faceUrl;
}
if (selfSignature != null) {
data['user_profile_item_self_signature'] = selfSignature;
}
if (allowType != null) {
data['user_profile_item_add_permission'] = _convert2CFriendAddPermission(allowType!);
}
// data['user_profile_item_language'] =
if (birthday != null) {
data['user_profile_item_birthday'] = birthday;
}
if (level != null) {
data['user_profile_item_level'] = level;
}
if (role != null) {
data['user_profile_item_role'] = role;
}
if (customInfo != null && customInfo!.isNotEmpty) {
List<Map<String, dynamic>> customInfoList = Tools.map2JsonList(
customInfo!, 'user_profile_custom_string_info_key', 'user_profile_custom_string_info_value');
data['user_profile_item_custom_string_array'] = customInfoList;
}
return data;
}