loginUnidentifiedUser method
Function to create a unidentified user in Intercom. You need to register your users before you can talk to them and track their activity in your app.
Implementation
@override
Future<void> loginUnidentifiedUser(
{IntercomStatusCallback? statusCallback}) async {
// to register an unidentified user, a unique id will be created using the package uuid
String userId = Uuid().v1();
await js.context.callMethod('Intercom', [
'update',
js.JsObject.jsify({
'user_id': userId,
}),
]);
// send the success callback only as web doesnot support the statusCallback.
statusCallback?.onSuccess?.call();
}