Get current counter value¶
Returns the current value of the counter.
Future<int> Backendless.counters.getValue(String counterName);
IAtomic counter = Backendless.counters.of(String counterName);
Future<int> counter.getValue();
where:
| Argument | Description |
|---|---|
counterName |
name of the counter to retrieve. |
Example¶
Function callback = (counterValue) => print("current counter value is - $counterValue");
Backendless.counters.get("my counter").then(callback);
IAtomic myCounter = Backendless.counters.of("my counter");
myCounter.get().then(callback);
Codeless Reference¶

where:
| Argument | Description |
|---|---|
counter name |
Name of the counter whose value must be retrieved. |
Returns the current value of the counter.
Consider the following counter:

The example below retrieves the current value of the counter. The result of this operation is 20.
