UserInfoUpdateRequest constructor
UserInfoUpdateRequest({})
Implementation
UserInfoUpdateRequest({
String? userId,
String? nickname,
FileInfo? fileInfo,
List<String>? discoveryKeys,
List<String>? preferredLanguages,
OnUploadProgressCallback? onProgress,
}) : super(userId: userId) {
isMultipart = fileInfo?.file != null;
url = 'users/${userId ?? state.userId}';
body = {
'nickname': nickname,
if (fileInfo != null) 'profile_file': fileInfo,
if (fileInfo?.url != null) 'profile_url': fileInfo?.url,
'discovery_keys': discoveryKeys,
'preferred_languages': preferredLanguages,
};
body.removeWhere((key, value) => value == null);
}