updateUser static method

Future<User?> updateUser(
  1. User user, {
  2. dynamic onSuccess(
    1. User retUser
    )?,
  3. dynamic onError(
    1. CometChatException excep
    )?,
})

Updating a user similar to creating a user should ideally be achieved at your backend using the Restful APIs

user a user object which user needs to be updated.

method could throw PlatformException with error codes specifying the cause

Implementation

static Future<User?> updateUser(User user,
    {Function(User retUser)? onSuccess,
    Function(CometChatException excep)? onError}) async {
  if (!checkAuthSettings(onError)) return null;

  User? user0;

  user0 = await CometChat.updateUser(user, authenticationSettings!.authKey!,
      onSuccess: onSuccess, onError: onError);

  return user0;
}