identify static method
- @Deprecated('Use identifyContact instead')
- required String userId,
- GleapUserProperty? userProperties,
- String? userHash,
identify
Updates a session's user data.
Params
gleapUserSession
The updated user data.
Available Platforms
Android, iOS, Web
Implementation
@Deprecated('Use identifyContact instead')
static Future<void> identify({
required String userId,
GleapUserProperty? userProperties,
String? userHash,
}) async {
if (!kIsWeb && !io.Platform.isAndroid && !io.Platform.isIOS) {
debugPrint(
'identify is not available for current operating system',
);
return;
}
if (userProperties != null && userHash != null) {
await _channel.invokeMethod(
'identify',
{
'userId': userId,
'userProperties': userProperties.toJson(),
'userHash': userHash,
},
);
} else if (userProperties != null) {
await _channel.invokeMethod(
'identify',
{
'userId': userId,
'userProperties': userProperties.toJson(),
},
);
} else {
await _channel.invokeMethod('identify', {'userId': userId});
}
}