updateUser method

  1. @override
Future<void> updateUser({
  1. String? email,
  2. String? name,
  3. String? avatarUrl,
  4. String? language,
  5. String? timezone,
  6. String? location,
})
override

Updates the current customer's attributes, Intercom style. Does not affect the identity (externalId), which keeps the one set at the last login. Every field is optional.

Implementation

@override
Future<void> updateUser({
  String? email,
  String? name,
  String? avatarUrl,
  String? language,
  String? timezone,
  String? location,
}) async {
  // Flat public params, serialised into an `attributes` map for transport,
  // since method channels only carry maps and primitives. On the Swift side,
  // `parseAttributes` rebuilds the AppwinSupportUserAttributes.
  await methodChannel.invokeMethod<void>('updateUser', {
    "attributes": {
      "email": email,
      "name": name,
      "avatarUrl": avatarUrl,
      "language": language,
      "timezone": timezone,
      "location": location,
    },
  });
}