increment method

Future<int> increment(
  1. String key,
  2. Duration ttl
)

Adds one to key and gives the new count. A new key, or a key older than ttl, starts at 1.

Implementation

Future<int> increment(String key, Duration ttl) async {
  List<int> counts = await _send(key, ttl.inMilliseconds, null);
  return counts[0];
}