pullValue static method
Implementation
@Deprecated('Use "Countly.instance.userProfile.pull" instead')
static Future<String?> pullValue(String type, String pullValue) async {
if (!_instance._countlyState.isInitialized) {
String message = '"initWithConfig" must be called before "pullValue"';
log('pullValue, $message', logLevel: LogLevel.ERROR);
return message;
}
log('Calling "pullValue":[$type], Value:[$pullValue]');
if (type.isEmpty) {
String error = 'pullValue, key cannot be empty';
log(error);
return 'Error : $error';
}
if (pullValue.isEmpty) {
String error = 'pullValue, value cannot be empty';
log(error);
return 'Error : $error';
}
List<String> args = [];
args.add(type);
args.add(pullValue);
final String? result = await _channel.invokeMethod('userData_pullValue', <String, dynamic>{'data': json.encode(args)});
return result;
}