updateUserMedia method
Future<UserModel?>
updateUserMedia(
{ - required dynamic socialMedia,
- dynamic userId,
})
Implementation
Future<UserModel?> updateUserMedia({required socialMedia, userId}) async {
Log(
logName: 'UpdateUserMedia',
className: 'User',
methodName: 'updateUserMedia',
type: 'INFO',
text:
'{event: Update User Media, user: ${currentUser?.userPayloadId}, user is ${currentUser?.firstName} ${currentUser?.lastName}, user id: $userId, social media: ${socialMedia.toString()}',
);
UserModel userModel;
return await _httpService
.updateUserMedia(socialMedia: socialMedia, userId: userId)
.then((user) {
if (user.statusCode >= 200 && user.statusCode < 300) {
var res = json.decode(user.body);
userModel = UserModel.fromJson(res);
return userModel;
}
return null;
});
}