incrementUserProperty static method

Future<void> incrementUserProperty({
  1. required ApphudUserPropertyKey key,
  2. required dynamic by,
})

Increment custom user property. Value must be one of: int, float

Example:

Apphud.incrementUserProperty(key: ApphudUserPropertyKey.customProperty('progress'), by: 0.5)
  • parameter key is required. Use your custom string key or some of built-in keys.
  • parameter by is required. You can pass negative value to decrement.

Implementation

static Future<void> incrementUserProperty({
  required ApphudUserPropertyKey key,
  required dynamic by,
}) =>
    _channel.invokeMethod(
      'incrementUserProperty',
      {
        'key': key.keyName,
        'by': by,
      },
    );