setUserId method
Sets the user ID for tracking purposes.
This method allows you to set a user ID after the SDK has been initialized.
Throws an UnimplementedError if the platform-specific implementation has not been provided.
Implementation
@override
Future<void> setUserId(String userId) async {
try {
await methodChannel.invokeMethod('setUserId', {'userId': userId});
} on PlatformException {
rethrow;
} catch (e) {
throw PlatformException(
code: 'SET_USER_ID_ERROR', message: 'Failed to set user ID: $e');
}
}