setUserData static method
Implementation
@Deprecated('Use "setUserProperties" instead')
static Future<String?> setUserData(Map<String, Object> options) async {
if (!_instance._countlyState.isInitialized) {
String message = '"initWithConfig" must be called before "setUserData"';
log('setUserData, $message', logLevel: LogLevel.ERROR);
return message;
}
int optionsCount = options.length;
log('Calling "setUserData" with options Count:[$optionsCount]');
List<dynamic> args = [];
Map<String, String> userData = _getUserData(options);
args.add(userData);
final String? result = await _channel.invokeMethod('setuserdata', <String, dynamic>{'data': json.encode(args)});
return result;
}