updateCurrentUserInfo method
Future<void>
updateCurrentUserInfo({
- String? nickname,
- FileInfo? fileInfo,
- List<
String> ? preferredLanguages, - OnUploadProgressCallback? progress,
Updates current user information with nickname
, fileInfo
,
preferredLanguages
.
Implementation
Future<void> updateCurrentUserInfo({
String? nickname,
FileInfo? fileInfo,
List<String>? preferredLanguages,
OnUploadProgressCallback? progress,
}) async {
if (nickname == null && fileInfo == null && preferredLanguages == null) {
throw InvalidParameterError();
}
final user = await _int.api.send<User>(UserInfoUpdateRequest(
// userId: _int.state.userId ?? '',
nickname: nickname,
fileInfo: fileInfo,
preferredLanguages: preferredLanguages,
onProgress: progress,
));
_int.state.currentUser?.copyWith(user);
}