putLong method

  1. @override
void putLong(
  1. String key,
  2. int value
)
override

Stores a 64-bit integer value under the key, replacing any existing value. key Key to set. value Value to store.

Example:

// Store long values
_userStorage!.putLong("registration_timestamp", 1640995200000);
_userStorage!.putLong(
 "last_login_timestamp",
 DateTime.now().millisecondsSinceEpoch,
);
print("Stored long values");

Implementation

@override
void putLong(String key, int value) {
    final _putLongFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Void Function(Pointer<Void>, NativeString, Int64),
        void Function(Pointer<Void>, NativeString, int)
      >('navigine_sdk_flutter_KeyValueStorage_putLong__Key_Value'));
    _putLongFfi(this.ptr, toNativeString(key), value);
    exception.checkCallResult();
}