setUserIdentifier method
Set the userId after configuring if they are already logged in or after the user logs in to your app: This user identifier is stored locally and this method can be called multiple times safely. We recommend you set the user identifier every time you configure UserLeap and anytime your customers login to be safe UserLeap allows you to identify visitors by supplying a userId. While tracking userIds is optional, it helps to provide a consistent experience across platforms and prevents users from seeing the same survey multiple times
Implementation
@override
Future setUserIdentifier(String userId) async {
return await _channel
.invokeMethod(Channels.SET_USER_IDENTIFIER, {'userId': userId});
}