#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;
}
- if your system allow users to register without image pass it
null - it will use the default image you can change it in backend
public/profile/default_user_image.png - name => user
full name - Email => can be
phone number or any unique idnot validation on it - Example
Note this function throw these exceptions
- User already in v chat database
- No internet connection