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