encodeInt method
expireDurationInSecond
override the default duration setting from enableAutoKeyExpire().
- Passing MMKV.ExpireNever (aka 0) will never expire.
Implementation
bool encodeInt(String key, int value, [int? expireDurationInSecond]) {
final keyPtr = key.toNativeUtf8();
final ret =
(expireDurationInSecond == null) ? _encodeInt64(_handle, keyPtr, value) : _encodeInt64V2(_handle, keyPtr, value, expireDurationInSecond);
calloc.free(keyPtr);
return _int2Bool(ret);
}