multiply static method
- @Deprecated('This function is deprecated, please use "Countly.instance.userProfile.multiply" instead and do not forget to call "Countly.instance.userProfile.save"')
Multiply user property by provided value returns the error or success message
Implementation
@Deprecated('This function is deprecated, please use "Countly.instance.userProfile.multiply" instead and do not forget to call "Countly.instance.userProfile.save"')
static Future<String?> multiply(String keyName, int multiplyValue) async {
if (!_instance._countlyState.isInitialized) {
String message = '"initWithConfig" must be called before "multiply"';
log('multiply, $message', logLevel: LogLevel.ERROR);
return message;
}
log('Calling "multiply":[$keyName], Value:[$multiplyValue]');
if (keyName.isEmpty) {
String error = 'multiply, key cannot be empty';
log(error);
return 'Error : $error';
}
List<String> args = [];
args.add(keyName);
args.add(multiplyValue.toString());
final String? result = await _channel.invokeMethod('userData_multiply', <String, dynamic>{'data': json.encode(args)});
return result;
}