Skip to main content

#Register new user First register the new user on your system (your backend) then register in vChat

  try{
final u = await VChatController.instance.register(
dto: VChatRegisterDto(
name: name,
/// if you pass imagePath to null v chat will use the default user image
/// see here for more info
userImage: imagePath == null ? null : File(imagePath!),
email: email,
),
context: context,
);
} on VChatSdkException catch(err){
// handle vchat exception here
rethrow;
}
  1. if your system allow users to register without image pass it null
  2. it will use the default image you can change it in backend public/profile/default_user_image.png
  3. name => user full name
  4. Email => can be phone number or any unique id not validation on it
  5. Example

Note this function throw these exceptions

  • User already in v chat database
  • No internet connection