setVisitorInfo method

Future<void> setVisitorInfo({
  1. String name = '',
  2. String email = '',
  3. String phoneNumber = '',
  4. String departmentName = '',
  5. List<String> tags = const [],
})

Set on Native/Custom chat user information

name The name of the user identified

email The email of the user identified

phoneNumber The phone number of the user identified

departmentName The chat department for chat, usually this field is empty

tags The list of tags to represent the chat context

Implementation

Future<void> setVisitorInfo({
  String name = '',
  String email = '',
  String phoneNumber = '',
  String departmentName = '',
  List<String> tags = const [],
}) async {
  final arguments = {
    'name': name,
    'email': email,
    'phoneNumber': phoneNumber,
    'departmentName': departmentName,
    'tags': tags,
  };
  try {
    await _channel.invokeMethod('setVisitorInfo', arguments);
  } catch (e) {
    print(e);
  }
}