putFloat method

  1. @override
void putFloat(
  1. String key,
  2. double value
)
override

Stores a 32-bit floating-point value under the key, replacing any existing value. key Key to set. value Value to store.

Example:

// Store float values
_userStorage!.putFloat("user_rating", 4.5);
_userStorage!.putFloat("temperature", 23.5);
print("Stored float values");

Implementation

@override
void putFloat(String key, double value) {
    final _putFloatFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Void Function(Pointer<Void>, NativeString, Float),
        void Function(Pointer<Void>, NativeString, double)
      >('navigine_sdk_flutter_KeyValueStorage_putFloat__Key_Value'));
    _putFloatFfi(this.ptr, toNativeString(key), value);
    exception.checkCallResult();
}