incrementOrInitInt method
Increments or initializes an integer value.
Implementation
Future<int> incrementOrInitInt(String key,
{int incrementBy = 1, int initialValue = 0}) async {
int currentValue = _prefs?.getInt(key) ?? initialValue;
int newValue = currentValue + incrementBy;
await saveInt(key, newValue);
return newValue;
}