updateUser method
Future<void>
updateUser({
- String? email,
- String? name,
- String? phone,
- String? company,
- String? companyId,
- String? userId,
- int? signedUpAt,
- String? language,
- Map<
String, dynamic> ? customAttributes, - IntercomStatusCallback? statusCallback,
override
Updates the attributes of the current Intercom user.
The signedUpAt
param should be seconds since epoch.
The language
param should be an an ISO 639-1 two-letter code such as en
for English or fr
for French.
You’ll need to use a four-letter code for Chinese like zh-CN
.
check this link https://www.intercom.com/help/en/articles/180-localize-intercom-to-work-with-multiple-languages.
See also:
Implementation
@override
Future<void> updateUser({
String? email,
String? name,
String? phone,
String? company,
String? companyId,
String? userId,
int? signedUpAt,
String? language,
Map<String, dynamic>? customAttributes,
IntercomStatusCallback? statusCallback,
}) async {
try {
await _channel.invokeMethod('updateUser', <String, dynamic>{
'email': email,
'name': name,
'phone': phone,
'company': company,
'companyId': companyId,
'userId': userId,
'signedUpAt': signedUpAt,
'language': language,
'customAttributes': customAttributes,
});
statusCallback?.onSuccess?.call();
} on PlatformException catch (e) {
statusCallback?.onFailure?.call(_convertExceptionToIntercomError(e));
}
}