declareString static method

Future<ApptimizeValueVariable<String>?> declareString(
  1. String name,
  2. String defaultValue

Create a string dynamic variable with a specified name and defaultValue.

Returns a new ApptimizeVariable of type String if no variable has been created before with this name. If an ApptimizeVariable already exists with this name it returns the existing String variable but does not update the default value or null if it is not a String.

The name must not be null.


static Future<ApptimizeValueVariable<String>?> declareString(
    String name, String defaultValue) async {
  return _declareDynamicVariable<String>(name, _DVTypeString, defaultValue);